I’m using Ruby to run an nmap -sP ping scan on my home network continuously to check for new hosts connecting. A couple of questions:
- Is there a better way to do this?
- How effective is
-sPat finding new hosts? - Will running this over and over on a loop create any problems for my home network which is used just for casual web browsing?
This is good enough if hosts are guaranteed to accept pings; however, sometimes
nmap -sPcan spew packets faster than wifi networks can deal with them. If you see issues like this, just lower the rate withnmap --scan-delay 0.1 -sP.As good as ping is; however, fresh Windows installations often block ping by default. You could run
nmap -sT -P0just to be sure you got everything…The ultimate host detection scheme is to poll your ethernet switch for new mac-address entries.
Nope