Nmap Development mailing list archives

Re: second batch of top ports


From: Daniel Miller <bonsaiviking () gmail com>
Date: Fri, 24 Apr 2015 10:46:56 -0500

On Fri, Apr 24, 2015 at 9:51 AM, Robin Wood <robin@digi.ninja> wrote:

I've ran a scan with --top-ports 100 but I'd now like to run a scan
for ports 100-200, I can't see any obvious way to do this except for
using the exclude port option which would be quite messy, is there a
better way?


Robin,

There's not a good way to do this currently. If we were to add such a
feature, I think it would be best to consider requirements of someone
splitting up a range of hosts or ports to be scanned by different scanners,
similar to John the Ripper's --node option.

For a workaround, here's a command built around Grepable [1] output's
ability to print a list of scanned ports:

nmap --top-ports 200 --exclude $(./nmap --top-ports 100 localhost -Pn -n
-oG - -v | awk -F'[;)]' '/TCP\(/{print $2}')

Dan

[1] http://nmap.org/book/output-formats-grepable-output.html
_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/

Current thread: