Nmap ping sweep faster

Asphyxia

Server Monkey
Administrator
Joined
Apr 25, 2015
Messages
1,364
Points
252
Age
26
Location
North America
Code:
nmap -sP 11.11.152.0/22 -n -v 3 --max-rtt-timeout 100ms -oG - | awk '/Up$/{print $2}'
What I highly recommend is this:
Code:
nmap -sP 11.11.152.0/22 -n -v 3 --max-rtt-timeout 100ms -oG - | awk '/Up$/{print $2}' > scan1
How many hosts found?

Code:
wc scan1
Now if we want to check on the top 20 ports as quickly as possible.

Code:
nmap -sTU --top-ports 20 11.11.152.0/22 -n -v 3 -T5 -oG the_20
This is going to write out a list of the open ports, now you can run an awesome command against the newly saved the_20 file.
Code:
cat the_20 | grep "Status:"
Would show you what all was scanned, both Down and Up, while:
Code:
cat the_20 | awk '/Up$/{print $2}'
Simply shows off the IPs showing as up (online).

... now ZMap time:
Code:
zmap -p22 11.11.152.0/22 --max-sendto-failures 10000 --output-file=zmap22
... I know this is more than just Nmap, just showing off ZMap in action!

Fun, fast, and simple.. copy/paste and change the IP address/range lol
 

masskiller

Member
Joined
Oct 4, 2016
Messages
2
Points
35
Age
118
i use this for pinging all hosts in a network in about 2 seconds

nmap -sn -T5 --max-parallelism 20 -PE -PM -PP -PR -PS -PA -PU -PY 192.168.0.0/24
 

masskiller

Member
Joined
Oct 4, 2016
Messages
2
Points
35
Age
118
ya, it doesn't always get all the hosts though, sometimes it takes running it 3 or 4 times to pick them all up, if you're using zenmap it just keeps adding them to the list of hosts tho, lol
 

Asphyxia

Server Monkey
Administrator
Joined
Apr 25, 2015
Messages
1,364
Points
252
Age
26
Location
North America
ya, it doesn't always get all the hosts though
Yeah I find that is a common problem with any type of host discovery. There is speed and then there is accuracy.

Sometimes finding that sweet in-between is difficult because you don't really know until you stop seeing new hosts pop up as you slow it down.. that you went the right speed. There surely has to be some network engineer that knows a way to find what the max speed across the network is though, like maybe get two devices connecting and throwing scans at each other first until stuff drops?

Idk.. you know what I am sayin' m8
 

Top