2 questions nmap: automatic scan with network unknown and very fast scan # hos

Started by rotation, April 18, 2013, 10:22:02 AM

Previous topic - Next topic

rotation

I need a little help regarding nmap scripting:

Assuming the network given by dhcp is not known (192 is not used) and it has to be automatically:
How do I initiate a nmap scan using the localnet?
arp-scan has a --localnet scan, but on nmap?



How do I initiate a very fast nmap ping scan showing only the machines which have responded and only via a small number of hops?

Thanks in Advance

electroblu3

Assuming I understood you correctly:

gw="`ip route list | grep "default" | cut -d" " -f3`"

nmap -sP $gw/24

Hope this helps.