scripts/netscan: Fix subnetwork IP

master
Pierre Neidhardt 2015-07-10 13:36:27 +02:00
parent 8b24052f85
commit 319382ee62
1 changed files with 1 additions and 1 deletions

View File

@ -5,6 +5,6 @@ if ! command -v nmap >/dev/null 2>&1; then
exit 1
fi
SUBNET="$(ifconfig | awk '/inet/ && $0 !~ "127.0.0.1" {gsub(/\.[0-9]+$/, ".*", $2) ; print $2}')"
SUBNET="$(ifconfig | awk '/inet / && $0 !~ "127.0.0.1" {gsub(/\.[0-9]+$/, ".*", $2) ; print $2}')"
echo "Scanning '$SUBNET'..."
nmap -sP "$SUBNET"