use LWP::UserAgent;
my $email = 'drtro@inattack.ru';
my $password = '~~~';
my $user_agent = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36 FirePHP/4Chrome';
my %postLoginData; #necessary post data for login
$postLoginData{'email'}=$email;
$postLoginData{'pass'}=$password;
$postLoginData{'persistent'}=1;
$postLoginData{'login'}='Login';
my @header = ('Referer'=>'http://www.facebook.com', 'User-Agent'=>$user_agent);
my $browser = LWP::UserAgent->new;
$browser->cookie_jar({});
$browser->get('http://www.facebook.com/login.php', @header);
$response = $browser->post('https://login.facebook.com/login.php', \%postLoginData, @header);
if($response->content =~ /Incorrect Email/) {
print "Login Failed...Quitting..\n";
} else {
print "..and we are in!\n";
}
Dirty login to facebook
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.