Re: Feature Request - Include Ports in -iL option

Daniel Miller <[email protected]>
Newsgroups gmane.comp.security.nmap.devel
Message-ID <CABmvJnOjsno5zfPT_uLJZR-k5u0XBUg=7FD9ncvSPKrF1eVOpg@mail.gmail.com>
lambda,

Yes, this has been requested many times. It has not been added as a feature
because it's not an easy fit with the current data structures and execution
model that Nmap uses. The scan engine uses the a single scan_lists
structure to specify what ports to scan for all targets. In order to skip
some ports for some hosts, it would require extensive reworking.

The most likely way ahead for your request would be integration of the
"port scanning from NSE" functionality [1] that has already been submitted
[2] and is waiting for full review. With this functionality, we could write
a "port scanning" script that would read your input and inform Nmap that
the ports in question are open with or without further checking. Then the
rest of the scan (version detection, NSE script scanning, etc.) could
proceed as usual.

Dan

[1]
https://secwiki.org/w/GSoC_community_ideas/Exploring_port_scanning_from_within_NSE
[2] https://github.com/nmap/nmap/pull/677

On Sat, May 6, 2017 at 4:41 AM, asdasd asdasd <[email protected]> wrote:

> Hello all,
>
> during recent scans I often had the problem that I scanned a predefined
> list of IP addresses from which I already knew which ports are open. I
> prefer to use the -iL option for large lists of IP addresses but
> unfortunately it is not possible yet to include ports in input lists.
>
> In my use case I would like to create a list like the following:
>
> 192.168.0.1:80
>
> 192.168.0.1:443
>
> 192.168.0.2:21
>
> ...
>
> etc.
>
> Was this already discussed in the past? Of course I could transform my
> list into separate commands to invoke nmap with the -p option, but this
> could be a large overhead.
>
> What do you think, would this be a helpful feature for you?
>
>
> Cheers,
>
> lambda
>
> _______________________________________________
> Sent through the dev mailing list
> https://nmap.org/mailman/listinfo/dev
> Archived at http://seclists.org/nmap-dev/
>

_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.