Nmap Development mailing list archives

Improved port specification in Gsoc


From: WEN Pingbo <wengpingbo () gmail com>
Date: Fri, 3 May 2013 02:29:05 +0800

hi, all
I'm a gsoc applicant. By reading the sources, I found "-p" arguments and
"--top-ports" were both processed in parse_options(int argc,char **argv),
and deliver it to apply_delayed_options function in
  if (o.ipprotscan) {
    if (o.portlist)
      getpts(o.portlist, &ports);
    else
      getpts((char *) (o.fastscan ? "[P:0-]" : "0-"), &ports);  // Default
protocols to scan
  } else if (!o.noportscan) {
    gettoppts(o.topportlevel, o.portlist, &ports);
  }

the func of gettoppts have invoked the getpts func to implement the use of
-p with --top-ports.

From the maillist, I found someone want to add a feature ,just like
--exlude-ports. So there are four methods to specify ports:range/signal,
ratio, type and exclude-ports(the ratio include --top-ports and
--port-ratio). And I think nmap supports any combinations about the four
methods to specify the ports is a wonderful feature. And I think we can
merge the four methods to just one option, -p, as filter string in tcpdump.

What is said above is my thought about this idea, and I think I can do this.

Please give me some feedback before the deadline of gsoc application, so I
can improve my proposal.
Thanks a lot.
Pingbo
_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: