Nmap Development mailing list archives

[PATCH] Reset nping's default tcp flags in ProbeMode


From: Josh Hunt <joshua.hunt () berkeley edu>
Date: Thu, 30 May 2013 17:24:17 -0500

[resending from subscribed mail]

I'm not sure what the appropriate procedure is to submit a patch to nmap,
but the following seems to resolve the issue David found (reported in
thread "nping --tcp sends syn no matter what --flags option i set").

It appears that libnetutil's TCPHeader defaults to setting the tcp flags
to TCP_DEFAULT_FLAGS, which is defined as:

#define TCP_DEFAULT_FLAGS 0x02

I can resubmit if there's a formal patch submission process that I'm not
following.

Reported-by: David Young <dayoung () akamai com>
Signed-off-by: Josh Hunt <johunt () akamai com>

--- nping/ProbeMode.cc.orig 2013-05-30 20:22:24.000000000 +0000
+++ nping/ProbeMode.cc 2013-05-30 20:18:02.000000000 +0000
@@ -799,6 +799,7 @@
   t.setOffset();
   t.setWindow( o.getTCPWindow() );
   t.setUrgPointer(0);
+  t.setFlags(0);

   /* Flags */
   if( o.getFlagTCP(FLAG_CWR) == 1 )  t.setCWR();
_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: