Nmap Development mailing list archives

Re: nmap-dev Digest, Vol 46, Issue 18


From: Luigi <luigi.3010 () gmail com>
Date: Tue, 20 Jan 2009 22:52:27 -0430

Date: Mon, 19 Jan 2009 21:43:16 +0000 Mark Davidson wrote:
Hi All

In nmap there is the functionality to list all the hosts that would be
scanned with given parameters using the -sL option.
I was wondering is there any possibility of being able to have the
functionality to output a list of all the hosts and ports that would be
scanned in a similar fashion?
As I am currently working on a project that would benefit from this greatly
or can anyone suggest a way of retrieving the ports that would be scanned in
another way.
I have looked at all the nmap options that I can find and the only way that
I can find of getting a full list of the ports that would be scanned is to
actually run the scan with debug on, then parse the output.

Thanks for your help in advance.

Mark Davidson

--------------------------------

Reply:

If you do a List Scan (nmap -sL <hosts>) it won't accept to introduce a -p
'x' parameter because you only do a List of your future mapping targets.

You can guess which ports nmap will scan depending on your scan parameters
and do yourself a list of probable ports scanned. A scan where no specific
ports are being to scan, it takes by default from 1 to 1024. If a -p x,y,z
is specified it will scan only those ones. I guess a port output can't be
done because thehost identification only does DNS matching & listing and
doesn't implies a SYN request (or another kind of availability request) so
no port is involved in this scan method.

The ports scanned (or port range) are barely shown in an normal output.
Beside, I guess with an output script it's possible to print on screen those
scanned ports specifying them in an array and outputting where you believe
you need it, and only when performing a 'real scan' of the host (said 'real
scan' referring to a scan which implies sending, receiving and parsing raw
connection packages)

So, good luck with your scripting!

Greetings,
Luigi

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: