-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscanner.sh
396 lines (268 loc) · 6.33 KB
/
scanner.sh
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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
figlet -f cyberlarge "NMAP-SCAN" | lolcat -a -d 7
echo -e "By : BegyaptFayon"
echo -e
echo -e "mYour Public IP Address is :"
curl http://ident.me
echo -e
echo -e
echo -e "mYour System IP Address is :"
hostname -I
echo -e
echo -e "mYour Host Name is : $HOSTNAME"
echo -e
read -p $'Enter the IP address or URL you want to scan : ' firstip
echo -e
echo -e "Enter the Port like this ( 0 200 ) means it will scan from Port o to 200."
echo -e
read -p $'Enter the Range Of PORTS :' port1 port2
echo -e
echo -e "You entered this IP :"$firstip""
echo -e
while true; do
read -p $'Do you want to continue (Y/N) ? : ' yn
case $yn in
[Yy]* ) break;;
[Nn]* ) echo && echo -e "Good-Bye" ;exit;;
* ) echo -e "Please answer it with ( Y/N )";;
esac
done
echo -e
echo -e
echo -e "CHOOSE THE TYPE OF SCAN YOU WANT TO EXECUTE"
echo -e
echo -e
echo -e "1. Simple Scan"
echo -e "2. Quick Scan"
echo -e "3. Quick Scan Plus"
echo -e "4. Quick Traceroute Scan"
echo -e "5. Slow Comprehensive Scan"
echo -e "6. Ping Scan (1)"
echo -e "7. Ping Scan (2)"
echo -e "8. Intense Scan , No Ping"
echo -e "9. Intense Scan, All TCP PORTS"
echo -e "10. Intense Scan Plus UDP"
echo -e "11. Intense Scan Regular"
echo -e "12. OS Detect Scan"
echo -e "13. Scan A List Of IP Address"
echo -e "14. Scan And Save The Result In XML File"
echo -e "15. Scan And Save The Result In TXT File"
echo -e "16. Scan And Save The Result In GREPable File"
echo -e "17. Scan For HOST Firewall Detection"
echo -e "18. Scan A HOST When Protected By Firewall"
echo -e "19. Scan And Detect Remote Server/Deamon"
echo -e "20. Scan A Firewall for MAC Address Spoofing"
echo -e "21. NMAP HELP"
echo -e "22. ABOUT AUTHOUR"
echo -e
echo -e
echo -e
read -p $'SELECT ONE OF THE OPTIONS WITH THE RESPECTED NUMBER : ' options
#All the Variables are here don't edit
one=1
two=2
three=3
four=4
five=5
six=6
seven=7
eight=8
nine=9
ten=10
eleven=11
twelve=12
thirteen=13
fourteen=14
fiveteen=15
sixteen=16
seventeen=17
eigthteen=18
nineteen=19
twenty=20
# ALL THE IF AND ELSE STATEMENT COMES HERES
if [ "$options" = "$one" ]
then
echo -e
echo -e
echo -e "Scanning the IP using 1st option"
echo -e
echo -e
nmap $firstip
fi
if [ "$options" = "$two" ]
then
echo -e
echo -e
echo -e "Scanning the IP using 2nd option"
echo -e
echo -e
nmap -T4 -F $firstip
fi
if [ "$options" = "$three" ]
then
echo -e
echo -e
echo -e "Scanning the IP using 2nd option"
echo -e
echo -e
nmap -sV -T4 -O -F --version-light 10 $firstip
fi
if [ "$options" = "$four" ]
then
echo -e
echo -e
echo -e "Scanning the IP using 4th option"
echo -e
echo -e
nmap -sn --traceroute 10 $firstip
fi
if [ "$options" = "$five" ]
then
echo -e
echo -e
echo -e "Scanning the IP using 5th option"
echo -e
echo -e
nmap -sS -sU -T4 -A -v -PE -PP -PS80,443 -PA3389 -PU40125 -PY -g 53 --script "default or (discovery and safe)" $firstip
fi
if [ "$options" = "$six" ]
then
echo -e
echo -e
echo -e "Scanning the IP using 6th option"
echo -e
echo -e
nmap -sn $firstip
fi
if [ "$options" = "$seven" ]
then
echo -e
echo -e
echo -e "Scanning the IP using 7th option"
echo -e
echo -e
nmap -Pn $firstip
fi
if [ "$options" = "$eight" ]
then
echo -e
echo -e
echo -e "Scanning the IP using 8th option"
echo -e
echo -e
nmap -T4 -A -v -Pn $firstip
fi
if [ "$options" = "$nine" ]
then
echo -e
echo -e
echo -e "Scanning the IP using 9th option"
echo -e
echo -e
nmap -p 1-65535 -T4 -A -v $firstip
fi
if [ "$options" = "$ten" ]
then
echo -e
echo -e
echo -e "Scanning the IP using 10th option"
echo -e
echo -e
nmap -sS -sU -T4 -A -v $firstip
fi
if [ "$options" = "$eleven" ]
then
echo -e
echo -e
echo -e "Scanning the IP using 11th option"
echo -e
nmap -T4 -A -v $firstip
fi
if [ "$options" = "$twelve" ]
then
echo -e
echo -e
echo -e "Scanning the IP using 12th option"
echo -e
echo -e
nmap -O $firstip
fi
if [ "$options" = "$thirteen" ]
then
echo -e
echo -e
echo -e "Scanning the IP using 13th option"
echo -e
echo -e "The Command Will Scan The IP Saved In The Name Directory In Name Of : ip-list.txt"
echo -e
echo -e
nmap -iL ip-list.txt
fi
if [ "$options" = "$fourteen" ]
then
echo -e
echo -e
echo -e "Scanning the IP using 14th option"
echo -e
echo -e "The Output Will Be Saved In The Name Of : scan-result.xml"
echo -e
echo -e
nmap -A -O -oX scan-result.xml $firstip
fi
if [ "$options" = "$fiveteen" ]
then
echo -e
echo -e
echo -e "Scanning the IP using 15th option"
echo -e
echo -e "The Output Will Be Saved In The Name Of : scan-result.xml"
echo -e
echo -e
nmap -A -O -oN scan-result.xml $firstip
fi
if [ "$options" = "$sixteen" ]
then
echo -e
echo -e
echo -e "Scanning the IP using 16th option"
echo -e
echo -e "The Output Will Be Saved In The Name Of : scan-result_GREP.txt"
echo -e
echo -e
nmap -A -O -oG scan-result_GREP.txt $firstip
fi
if [ "$options" = "$seventeen" ]
then
echo -e
echo -e
echo -e "Scanning the IP using 17th option"
echo -e
echo -e
nmap -sA $firstip
fi
if [ "$options" = "$eightteen" ]
then
echo -e
echo -e
echo -e "Scanning the IP using 18th option"
echo -e
echo -e
nmap -PN $firstip
fi
if [ "$options" = "$nineteen" ]
then
echo -e
echo -e
echo -e "Scanning the IP using 19th option"
echo -e
echo -e
nmap -sV $firstip
fi
if [ "$options" = "$twenty" ]
then
echo -e
echo -e
echo -e "Scanning the IP using 20th option"
echo -e
echo -e
nmap -v -sT -PN --spoof-mac 0 $firstip
fi