Windows 10 Support Ending Soon
Windows 10 Support Ending Soon
Windows 10 Support Ending Soon
You're viewing a single thread.
Yeah? No looking it up, give me a bash script for a ping scan of a subnet with a 24 bit mask.
#!/bin/bash
ping 255.255.255.0 > checker &
sleep 5
kill "$!"
grep unreachable checker || echo '255.255.255.0'
ping 255.255.255.1 > checker &
sleep 5
kill "$!"
grep unreachable checker || echo '255.255.255.1'
ping 255.255.255.2 > checker &
sleep 5
kill "$!"
grep unreachable checker || echo '255.255.255.2'
...
Did I do it coach? 😭
You get an A for effort!
nmap -sn x.x.0.0/24 I think, was a while. Pure coincidence how I know.
Edit: no, it's one less x because 16 is the middle.
Close!
That's not a bash script silly.
Just add #!/bin/bash
before the code from above.
Dang.
#!/bin/bash
for i in 0..254; do ping -c 4 10.0.0.$i &; done
wait
Throwing that many background tasks at once is a little risky, but awesome