Skip to content

Commit e1304e5

Browse files
committed
increase nmap scan speed by disabling host detection and port scan
1 parent 1a32094 commit e1304e5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

rootfs/netbox-scanner/nmap-scan.sh

+5-4
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ mapfile -t NETWORKS < networks.txt
3333
for net in "${NETWORKS[@]}"; do
3434
echo "Scan network $net"
3535
NETNAME=$(echo $net | tr -s '/' '-')
36-
# requires sudo
37-
nmap "$net" -T4 -O -F --host-timeout 30s -oX nmap-"$NETNAME".xml
38-
# does not require sudo
39-
#nmap "$net" -T4 -sn --host-timeout 30s -oX nmap-"$NETNAME".xml
36+
# -T<0-5> Set timing template (higher is faster). The template names are paranoid (0), sneaky (1), polite (2), normal (3), aggressive (4), and insane (5).
37+
# -sn Ping Scan - disable port scan
38+
# -PE Use ICMP echo request queries
39+
# nmap "$net" -T4 -sn -PE --host-timeout 30s -oX nmap-"$NETNAME".xml
40+
nmap "$net" -sn -PE --host-timeout 30s -oX nmap-"$NETNAME".xml
4041
done
4142
echo
4243

0 commit comments

Comments
 (0)