Nmap Development mailing list archives

[Exp PATCH] Add a few more options for --scanflags


From: Kris Katterjohn <katterjohn () gmail com>
Date: Wed, 17 Jan 2007 09:13:29 -0600

The attached patch (/nmap-exp/kris SVN r4360) adds a few more option
names for --scanflags. SVN log:

------------------------------------------------------------------------
r4360 | kris | 2007-01-17 08:59:28 -0600 (Wed, 17 Jan 2007) | 1 line

Add a few more options for --scanflags. Now ECE, CWR, ALL, and NONE can
be used. They have all been possible to set using a number, so I thought
I would add names to make it easier (I like the names more :)).
------------------------------------------------------------------------

I don't really expect there to be any problems with this, but I just
wanted to put it in /nmap-exp/kris and send it here before it (possibly)
goes into /nmap. So any feedback is appreciated.

The second patch is for Fyodor because we can't edit the XML manpage
from SVN right now.

Thanks,
Kris Katterjohn
Index: nmap.cc
===================================================================
--- nmap.cc     (revision 4359)
+++ nmap.cc     (revision 4360)
@@ -148,6 +148,18 @@
     if (strcasestr(arg, "URG")) {
       flagval |= TH_URG;
     } 
+    if (strcasestr(arg, "ECE")) {
+      flagval |= TH_ECE;
+    } 
+    if (strcasestr(arg, "CWR")) {
+      flagval |= TH_CWR;
+    } 
+    if (strcasestr(arg, "ALL")) {
+      flagval = 255;
+    }
+    if (strcasestr(arg, "NONE")) {
+      flagval = 0;
+    }
   }
   return flagval;
 }
--- nmap-man.xml.orig   2007-01-17 08:42:51.000000000 -0600
+++ nmap-man.xml        2007-01-17 08:43:32.000000000 -0600
@@ -1276,11 +1276,13 @@ your creative juices flow, while evading
 flag value such as 9 (PSH and FIN), but using symbolic names is
 easier.  Just mash together any combination of  <literal moreinfo="none">URG</literal>,
 <literal moreinfo="none">ACK</literal>, <literal moreinfo="none">PSH</literal>,
-<literal moreinfo="none">RST</literal>, <literal moreinfo="none">SYN</literal>, and
-<literal moreinfo="none">FIN</literal>.  For example, <option>--scanflags
-URGACKPSHRSTSYNFIN</option> sets everything, though it's not very
-useful for scanning.  The order these are specified in is
-irrelevant.</para>
+<literal moreinfo="none">RST</literal>, <literal moreinfo="none">SYN</literal>,
+<literal moreinfo="none">FIN</literal>, <literal moreinfo="none">ECE</literal>, and
+<literal moreinfo="none">CWR</literal>. There are also two convenience names you can use:
+<literal moreinfo="none">ALL</literal> and <literal moreinfo="none">NONE</literal>. For
+example, <option>--scanflags URGACKPSHRSTSYNFINECECWR</option> and
+<option>--scanflags ALL</option> both set everything, though they're not very useful for
+scanning. The order these are specified in is irrelevant.</para>
 
 <para>In addition to specifying the desired flags, you can specify a
 TCP scan type (such as <option>-sA</option> or <option>-sF</option>).

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

Current thread: