Home page logo
/

nmap-dev logo Nmap Development mailing list archives

Re: Nmap 4.60 Compilation Errors with Visual Studios 2008
From: "Mike pattrick" <mpattrick () rhinovirus org>
Date: Wed, 2 Apr 2008 00:10:35 -0400

 Date: Tue, 1 Apr 2008 16:02:05 -0400
 From: "Kevin T. Johnston" <kjohnston () syrres com>
 Subject: Nmap 4.60 Compilation Errors with Visual Studios 2008
 To: <nmap-dev () insecure org>
 Message-ID: <004f01c89433$426298e0$c727caa0$ () com>
 Content-Type: text/plain;       charset="iso-8859-1"

 I get 142 error and 8 warnings compiling NMAP 4.6 under the new Visual
 Studio 2008.  Any ideas?  Who knows what Microsoft did with latest VS.  I'm
 having difficulty figuring out what the real issue is.  Thanks for any
 input.  Get a totally different set of errors/warning under VS 2005.

 Here's a sample:
 - snip -

Hello Kevin ,

I had the same problem compiling in VS express 2008 on Windows Vista.
It seems that Microsoft decided to implement a few more functions in
their 2008 framework, here is a (Albeit hacky) solution that worked
for me.

In the nbase, dnet, nmap, and nsock subprojects, define the following
preprocessor definitions:

HAVE_INET_PTON
HAVE_INET_NTOP
HAVE_VSNPRINTF

Then, in the nbase subproject:
comment out the 'inet_pton' function in 'inet_pton.c'
comment out the 'inet_ntop' function in 'inet_ntop.c'


Then, comment out the line "#define vsnprintf _vsnprintf'" in the
following files:
os.h - dnet
nbase.h - nbase

Finally, go into tcpip.cc and change the following:

    inet_ntop(AF_INET, frame+38, who_has, sizeof(who_has));
    inet_ntop(AF_INET, frame+28, tell, sizeof(tell));
    Snprintf(arpdesc, sizeof(arpdesc), "who-has %s tell %s", who_has, tell);
  } else { /* ARP REPLY */
    inet_ntop(AF_INET, frame+28, who_has, sizeof(who_has));

to

    inet_ntop(AF_INET, (void*)(frame+38), who_has, sizeof(who_has));
    inet_ntop(AF_INET, (void*)(frame+28), tell, sizeof(tell));
    Snprintf(arpdesc, sizeof(arpdesc), "who-has %s tell %s", who_has, tell);
  } else { /* ARP REPLY */
    inet_ntop(AF_INET, (void*)(frame+28), who_has, sizeof(who_has));


Sincerely,
Michael Patrick
University of Ontario - Faculty of BIT - Information Security

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


  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]
AlienVault