forked from Anteste/WebMap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebmap.py
More file actions
executable file
·193 lines (179 loc) · 7.93 KB
/
Copy pathwebmap.py
File metadata and controls
executable file
·193 lines (179 loc) · 7.93 KB
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
#!/usr/bin/python3
import os
import sys
import socket
ans=True
while ans:
print
print('====================================')
print('# WEBMAP #')
print('====================================')
print("1. Nmap Scan")
print("2. Dirsearch Scan")
print("3. Nikto Scan")
print("A. All the Scans")
print("G. Get The Tools")
print("E. Exit")
print('====================================')
ans=input("What would you like to do? Enter your selection: ")
if ans=="1":
os.system('cls' if os.name == 'nt' else 'clear')
ans=True
while ans:
print
print('====================================')
print('# Nmap Scan #')
print('====================================')
print("1. Scan An IP Address For Open Ports")
print("2. Operating System Scan")
print("3. Agressive Scan For An IP Address")
print("4. Scan The Network For All Devices")
print("M. Main Menu")
print('====================================')
print
ans=input("What would you like to do? Enter your selection: ")
if ans=="1":
os.system('cls' if os.name == 'nt' else 'clear')
print
print("______________________________________________________________________")
print
portscan=input("Enter the IP you want to scan the ports of: ")
portipscan = socket.gethostbyname(portscan)
print("______________________________________________________________________")
os.system("nmap " + portipscan)
print("______________________________________________________________________")
elif ans=="2":
os.system('cls' if os.name == 'nt' else 'clear')
print
print("______________________________________________________________________")
print
osscan=input("Enter the IP you want to find the operating system of: ")
osipscan = socket.gethostbyname(osscan)
print("______________________________________________________________________")
os.system("nmap -O " + osipscan)
print("______________________________________________________________________")
elif ans=="3":
os.system('cls' if os.name == 'nt' else 'clear')
print
print("______________________________________________________________________")
print
ascan=input("Enter the IP you want to scan: ")
aipscan = socket.gethostbyname(ascan)
print
print("______________________________________________________________________")
os.system("nmap -A " + aipscan)
print("______________________________________________________________________")
elif ans=="4":
os.system('cls' if os.name == 'nt' else 'clear')
print
print("______________________________________________________________________")
print
snscan=input("Enter your address and range (i.e. 192.168.0.1/24) now: ")
snipscan = socket.gethostbyname(snscan)
print
print("______________________________________________________________________")
os.system("nmap -sn " + snipscan)
print("______________________________________________________________________")
elif ans=="M":
os.system('cls' if os.name == 'nt' else 'clear')
os.system('python3 webmap.py')
else:
os.system('cls' if os.name == 'nt' else 'clear')
print
print("Not Valid Choice Try again")
print
os.system("python3 webmap.py")
ans = None
elif ans=="2":
os.system('cls' if os.name == 'nt' else 'clear')
print
print('====================================')
print('# Dirsearch Scan #')
print('====================================')
print
dirtarget=input("Enter target: ")
print("___________________________________________________________________________")
print
os.system("/opt/dirsearch/dirsearch.py -u " + dirtarget)
print("______________________________________________________________________")
if ans=="":
os.system('cls' if os.name == 'nt' else 'clear')
elif ans=="3":
os.system('cls' if os.name == 'nt' else 'clear')
print
print('====================================')
print('# Nikto Scan #')
print('====================================')
print
niktotarget=input("Enter target: ")
print("___________________________________________________________________________")
print
os.system("nikto -host " + niktotarget)
print("______________________________________________________________________")
if ans=="":
os.system('cls' if os.name == 'nt' else 'clear')
elif ans=="A":
os.system('cls' if os.name == 'nt' else 'clear')
print
print('====================================')
print('# All The Scans #')
print('====================================')
targetall = input("Enter the target URL : ")
outputall = input("Enter the output folder : ")
ipall = socket.gethostbyname(targetall)
print("___________________________________________________________________________")
print
os.system('gnome-terminal -- bash -c "nmap -A '+ipall+' -o '+outputall+'/nmap.txt && bash"')
os.system('gnome-terminal -- bash -c "python3 /opt/dirsearch/dirsearch.py -u '+targetall+ ' -e * --simple-report='+outputall+'/dirsearch.txt && bash"')
os.system('gnome-terminal -- bash -c "nikto +h '+targetall+' -output '+outputall+'/nikto.txt && bash"')
if ans=="":
os.system('cls' if os.name == 'nt' else 'clear')
elif ans=="G":
os.system('cls' if os.name == 'nt' else 'clear')
ans=True
while ans:
print
print('====================================')
print('# Get The Tools #')
print('====================================')
print("1. Download Nmap")
print("2. Download Dirsearch")
print("3. Download Nikto")
print("M. Main Menu")
print('====================================')
print
ans=input("Which program do you still need? Enter the number: ")
if ans=="1":
print('Downloading Nmap Now...')
print
print
os.system("sudo apt-get install nmap")
elif ans=="2":
print('Downloading Dirsearch Now...')
print
print
os.system("cd /opt && sudo git clone https://github.com/maurosoria/dirsearch.git")
elif ans=="3":
print('Downloading Nikto Now...')
print
print
os.system("sudo apt-get install nikto")
elif ans=="M":
os.system('cls' if os.name == 'nt' else 'clear')
os.system('python3 webmap.py')
else:
os.system('cls' if os.name == 'nt' else 'clear')
print
print("Not Valid Choice Try again")
print
os.system("python3 webmap.py")
ans = None
elif ans=="E":
os.system('cls' if os.name == 'nt' else 'clear')
ans = None
else:
os.system('cls' if os.name == 'nt' else 'clear')
print
print("Not Valid Choice Try again")
print
os.system("python3 webmap.py")