Nmap scan list of IPs
2020-03-07 23:02:21
#!/usr/bin/env bash
mkdir result
input="ips.txt"
while IFS= read -r line
do
FILE=result/"$line".txt
if [[ -f "$FILE" ]]; then
echo "Scan for $line is ready"
else
echo "Scan for $line started"
nmap -p- "$line" -T5 > $FILE
echo "Scan for $line is ready"
fi
done < "$input"