Nmap Development mailing list archives
Re: Port specification feature request: +p
From: David Fifield <david () bamsoftware com>
Date: Tue, 20 Nov 2012 15:54:34 -0800
On Mon, Nov 19, 2012 at 07:56:28PM -0500, Hank Leininger wrote:
Often I want to scan the default list of ports, plus a handful of specific ones. I don't know a clean way to do this; currently I either: - manually specify all the ports I want to scan (0-1024 is easy, but the others? meh.) - hack my /usr/share/nmap/nmap-services to add the ports in question (forget to propagate to other boxes, lose after the next upgrade, etc) - run one nmap scan with default ports selected, and a second scan for the additional ones that I care about - write an ugly one-liner to extract ports manually from nmap-services, and stir in the ones I want (and lose the list & the one-liner by the next time this comes up) - scan all the ports! (because I would probably end up doing so later in the engagement anyway, but means I wait longer for initial results) Is there a better way? Assuming not, how about an enhancement to the port-specification options, to allow you to either do: nmap +p 56565 or nmap -p +56565 Either of which would mean "Add the specified port(s) to the list nmap would otherwise use" (the default list, if nothing else is specified, or the Fast list if -F was specified, etc). Is there a)interest from others in this feature, b)no objection from nmap core devs to such a thing, c)interest/bandwidth by an existing nmap hacker to add such a thing?
I think that this is a good feature. I would rather not introduce new syntax. I think just plain -p should take the union of the -p list and whatever Nmap would otherwise use. Likewise you should be able to use -p more than once. -p 56565 scans 1 port --top-ports 1000 -p 56565 scans 1001 ports --top-ports 1000 -p 80 scans 1000 ports -F -p 56565 scans 100 ports (c) above is likely false, so we would welcome a patch. David Fifield _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Port specification feature request: +p Hank Leininger (Nov 20)
- Re: Port specification feature request: +p David Fifield (Nov 20)
- Re: Port specification feature request: +p jah (Nov 20)
- Re: Port specification feature request: +p Daniel Miller (Nov 20)
- <Possible follow-ups>
- Fwd: Re: Port specification feature request: +p jah (Nov 21)
- Re: Port specification feature request: +p David Fifield (Nov 20)