Nmap Development mailing list archives

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


From: "Young, David" <dayoung () akamai com>
Date: Fri, 31 May 2013 19:50:46 -0400

The patch works for my purposes:

When using no --flags option, Syn is sent.
When using a --flags option, only the flags specified are sent.

-dave

-----Original Message-----
From: Josh Hunt [mailto:joshua.hunt () berkeley edu] 
Sent: Thursday, May 30, 2013 6:24 PM
To: dev () nmap org
Subject: [PATCH] Reset nping's default tcp flags in ProbeMode

[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/
_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: