-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAutoNmap.sh
More file actions
executable file
·54 lines (42 loc) · 1.29 KB
/
AutoNmap.sh
File metadata and controls
executable file
·54 lines (42 loc) · 1.29 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
#!/bin/bash
IP=$1
if [ $# -lt 1 ]
then
echo "Usage : $0 <IP address>"
exit 1
fi
if [ ! -d scans/ ]
then
mkdir scans
fi
echo ""
echo "#############################################"
echo "[+] Starting quick TCP scan (1000 ports, T5)"
echo "#############################################"
echo ""
nmap -Pn -T5 $IP -oA scans/tcp_quick
echo ""
echo "#############################################"
echo "[+] Starting quick UDP scan (top 100 ports)"
echo "#############################################"
echo ""
nmap -Pn -sU --top-ports 100 --reason $IP -oA scans/udp_quick
echo ""
echo "#############################################"
echo "[+] Starting long TCP scan (full ports, sV, sC)"
echo "#############################################"
echo ""
nmap -Pn -p- -sC -sV -O --reason $IP -oA scans/tcp_full
echo ""
echo "#############################################"
echo "[+] Starting long UDP scan (full ports, sV)"
echo "#############################################"
echo ""
nmap -Pn -sU -p- --reason --min-rate 5000 $IP -oA scans/udp_full
echo ""
echo "#############################################"
echo "[+] Results"
echo "#############################################"
# https://github.com/vdjagilev/nmap2md
/opt/nmap2md/nmap2md.py scans/tcp_full.xml
/opt/nmap2md/nmap2md.py scans/udp_full.xml