August 12, 2004

nmap patch for XPSP2

For those people who need nmap working on XP SP2, I have written a quick patch that will remove raw socket support from nmap and let nmap work again, failing over to standard mode as it is in previous versions of Windows.

--- winip.c 2004-08-12 10:18:46.000000000 -0700
+++ winip.c 2004-08-12 10:19:08.000000000 -0700
@@ -379,6 +379,9 @@
rawsock_avail = 0;

+ winbug = 1;
+ rawsock_avail = 0;
if(wo.trace) printf("***WinIP*** reading winpcap interface list\n");

You can also download the patch here.

Posted by SilverStr at August 12, 2004 10:28 AM | TrackBack


Great to see a patch for NMAP is online. However I am going to show my ignorance and ask how do I actually install this patch ?

Would be great to hear back from somebody.


Posted by: Roger at August 17, 2004 02:28 AM

I personally installed the patch by downloading the source from, and following the instructions up until the point of doing the actual build. Right before that step, I opened the winip.c file and added the 2 lines of code in where it looked like it went. (I did a search for "rawsock_avail = 0;" however I believe if you use the patch program it'll automate this for you)

Then build it, and run the exe. Feel free to email me if you need more help.

Posted by: Matt at October 4, 2004 10:18 AM

Don't even need to do that. My patches are now integrated into the latest nmap sources.

Posted by: SilverStr at October 4, 2004 10:25 AM