Advertisement
Quantumzblue

Log in facebook

Mar 2nd, 2016
424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 1.43 KB | None | 0 0
  1. #!/usr/bin/perl -w
  2. #
  3. # # ===== READ ME =====
  4. # # for enable ssl
  5. # $>cpan install LWP::Protocol::https::Socket
  6. #
  7. #
  8.  
  9. use Data::Dumper;
  10. use HTTP::Cookies;
  11. use LWP::UserAgent;
  12.  
  13. my $cookie_jar = HTTP::Cookies->new(autosave =>1, ignore_discard=>1, hide_cookie2=>1);
  14. my $browser = LWP::UserAgent->new(
  15.   agent => 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36',#* useragent must lasted version
  16.   timeout => 25,
  17.   cookie_jar => $cookie_jar,
  18. );
  19.  
  20. my $user = 'quantumzblue@gmail.com';
  21. my $pass = 'k041887326k';
  22.  
  23. my $index = $browser->get('https://www.facebook.com/login.php?login_attempt=1')->content;
  24. my ($code_lsd) = $index =~ /name="lsd" value="(.+?)"/ig;
  25. my ($code_lgnrnd) = $index =~ /name="lgnrnd" value="(.+?)"/ig;
  26.  
  27. my $req = $browser->post('https://www.facebook.com/login.php?login_attempt=1',
  28.   [
  29.     email => $user,
  30.     pass => $pass,
  31.     charset_test => '%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84',
  32.     lsd => $code_lsd,
  33.     lgnrnd => $code_lgnrnd,
  34.     locale => 'th_TH',
  35.     persistent => '1',
  36.     default_persistent => '1',
  37.  
  38.   ]
  39. )->content;
  40. my $res = $browser->get('https://www.facebook.com');
  41. print $res->content;
  42.  
  43. sleep();
  44.  
  45. # some account disable login from another computer <checkpoint>
  46.  
  47. # check point flow
  48. # my $checkpoint = $browser->get('https://www.facebook.com/checkpoint/?next');
  49. # print Dumper($checkpoint);
  50. #.
  51. #.
  52. #.
  53. #.
  54.  
  55. #code here
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement