i use below function to scan if in my network port 80 is open or not,
in case if port is closed, it wait for 1sec, how can i seed it up?
so the same function will can run 10 times in the same time or something like?
while read ip
do
nc -zw1 $ip 80 && echo "$ip" >> opened || echo "$ip" >> closed;
done < list
or maybe an alternative what will do the same more fast,
Thank you.
nmap
instead.