#!/usr/bin/perl $user = 'username'; # hotmail user name $pass = 'password'; # hotmail password $addr = 'fwdaddress@foo.com'; # forwarding address $delay = 30; # delay (in seconds) between sending messages $delete_messages = 0; # 0/1 => don't/do delete messages from th +e hotmail account require LWP::UserAgent; require HTTP::Cookies; # set up our super cool web browser $ua = LWP::UserAgent->new; push @{$ua->requests_redirectable}, 'POST'; $ua->cookie_jar(HTTP::Cookies->new({})); $ua->agent("yellow rubber ducky"); # let's get some "hot" mail $html = $ua->get('http://www.hotmail.com')->content; # we don't need no stinkin' javascript while( $html =~ s/<input type=hidden name="([^"]*)" value="([^"]*)">// + ){ $form{$1} = $2; } $html = $ua->post( 'http://login.passport.net/uilogin.srf?id=2', \%for +m)->content; # log on in $html =~ /<form TARGET="_top" name="hotmail_com" action="([^"]*)"/; $html = $ua->post( $1, ['login' => $user, 'passwd' => $pass, 'domain' => 'hotmail.com', 'sec' => '', 'mspp_shared' => '', 'padding' => substr( "xxxxxxxxxxxxxxxx", +0, 16-length($pass))])->content; # follow the magic meta $html =~ /<META HTTP-EQUIV="REFRESH" CONTENT="0; URL=([^"]*)"/; $html = $ua->get($1)->content; # we definetly don't need no stinking internet explorer $html =~ /<form name="cont" action="([^"]*)"/; $html = $ua->post( $1, ['curmbox' => 'F000000001', 'HrsTest' => ''])->content; $base = $1; $base =~ s/\/cgi-bin\/.*//; # find out where we can get our free massages $html =~ /_UM = "([^"]*)"/; $UM = $1; while( $html =~ s/<a href="javascript:G\('(\/cgi-bin\/getmsg?[^']*)'// + ){ if( $1 !~ /msgread/ ){ push @messes, $1; } } # get the whole mess foreach $mess(@messes){ $html = $ua->get($base.$mess."&".$UM)->content; # junk it if( $delete_messages ){ $html =~ /<a href="#" onclick="G\('([^']*)'.*>Delete<\/a>/; $ua->get($base.$1."&".$UM); } # go straight to the source (set the options for advanced view) $html =~ /<a href="([^"]*)" target="_blank">View E-mail Message So +urce<\/a>/; $html = $ua->get($1)->content; $html =~ /<A HREF="([^"]*)">here<\/A>/; $html = $ua->get($1)->content; # clean up the mess $html =~ s/<pre>\s*([\w\W]*)<\/pre>[\w\W]*/$1/; $html =~ s/&quot;/"/gi; $html =~ s/&lt;/</gi; $html =~ s/&gt;/>/gi; $html =~ s/&amp;/&/gi; $html =~ s/\n\.\n/\n .\n/g; $html =~ s/(\s+)To:.*/$1To: $addr/; open MAIL, "|/usr/sbin/sendmail -t"; print MAIL $html; close MAIL; sleep($delay); }

In reply to Hotmail Login/Forwarding Script by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.