#!/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/"/"/gi; $html =~ s/</</gi; $html =~ s/>/>/gi; $html =~ s/&/&/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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |