-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathwaves.py
143 lines (125 loc) · 3.43 KB
/
waves.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
import socket
from Plugins.reverseip import ReverseIP
from Plugins.subdomain import SubDomain
from Plugins.nslookup import nsLookup
from Plugins.cmsdetect import CMSdetect
from Plugins.nmap_recon import DefaultPort,Customrange
from Vulnerabilities.clickjacking import ClickJacking
from Vulnerabilities.hostheader import HostHeader
from Vulnerabilities.cors import Cors
from Vulnerabilities.openredirect import OpenRedirect
from Vulnerabilities.bruteforce import ssh,ftp
def Banner():
print('''
dP dP dP .d888888 dP dP 88888888b
88 88 88 d8' 88 88 88 88
88 .8P .8P 88aaaaa88a 88 .8P a88aaaa
88 d8' d8' 88 88 88 d8' 88
88.d8P8.d8P 88 88 88 .d8P 88
8888' Y88' 88 88 888888' 88888888P \n''')
host = None
port = None
# Checking whether the target host is alive or dead
def CheckTarget():
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
result = s.connect_ex((host, port))
if result == 0:
return True
else:
return False
# Main Method
def Main():
Banner()
global host
host = input("Enter the Target Host : ")
global port
port = int(input("Enter the Target port : "))
print('')
print("Starting WAVES \n")
print("Checking whether the Target is reachable \n")
# calling CheckTarget method
if CheckTarget()==True:
print("Target Alive \n")
print("Host : " + host)
print("Port : %s" % port)
else:
print("The Host is Unreachable \n")
exit()
NmapFunctions = {
1: DefaultPort,
2: Customrange,
}
def nmaprec(host,port):
Choice = 1
while True:
print("1. Scan Default Ports (22-443)")
print("2. Enter Custom Range")
print("3. Back to Main Menu")
print('')
Choice = int(input(">> "))
if (Choice >= 0) and (Choice < 3):
NmapFunctions[Choice](host, port)
elif Choice == 3:
Menu()
else:
print("Please choose an Appropriate option")
BruteFunctions = {
1: ssh,
2: ftp
}
def BruteForce(host, port):
Selection = 1
while True:
print('')
print("1. SSH")
print("2. FTP")
print("3. Main Menu")
print('')
Selection = int(input(">> "))
print('')
if (Selection >= 0) and (Selection < 3):
BruteFunctions[Selection](host, port)
elif Selection == 3:
Menu()
else:
print("Please choose an Appropriate option")
MainFunctions = {
1: ReverseIP,
2: SubDomain,
3: nsLookup,
4: ClickJacking,
5: OpenRedirect,
6: Cors,
7: HostHeader,
8: CMSdetect,
9: nmaprec,
10: BruteForce
}
def Menu():
Selection = 1
while True:
print('')
print("1. ReverseIP")
print("2. SubDomain")
print("3. nsLookup")
print("4. ClickJacking")
print("5. OpenRedirect")
print("6. CORS")
print("7. Host Header Injection")
print('8. CMS Detection')
print("9. Nmap Port Scan")
print("10. BruteForce")
print("11. Exit")
print('')
Selection = int(input(">> "))
print('')
if (Selection >= 0) and (Selection < 11):
MainFunctions[Selection](host, port)
elif Selection == 11:
exit()
else:
print("Please choose an Appropriate option")
#calling main methods
if __name__ == "__main__":
Main()
Menu()