1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Merging changes from my vc2008-testing branch. This moves Windows development

to VC++2008.
This commit is contained in:
kris
2008-06-13 05:58:11 +00:00
parent 2e48dde838
commit 44f6087b94
19 changed files with 47 additions and 48 deletions

View File

@@ -28,7 +28,6 @@
#if !defined(__GNUC__) #if !defined(__GNUC__)
typedef unsigned int ssize_t; typedef unsigned int ssize_t;
#define snprintf _snprintf #define snprintf _snprintf
#define vsnprintf _vsnprintf
#endif #endif
#else #else
# include <sys/param.h> # include <sys/param.h>

View File

@@ -216,7 +216,7 @@
#define HAVE_UNISTD_H 1 #define HAVE_UNISTD_H 1
/* Define if you have the <winsock2.h> header file. */ /* Define if you have the <winsock2.h> header file. */
/* #undef HAVE_WINSOCK2_H */ #define HAVE_WINSOCK2_H
/* Name of package */ /* Name of package */
#define PACKAGE "libdnet" #define PACKAGE "libdnet"
@@ -228,7 +228,7 @@
#define VERSION "1.10" #define VERSION "1.10"
/* Define for faster code generation. */ /* Define for faster code generation. */
/* #undef WIN32_LEAN_AND_MEAN */ #define WIN32_LEAN_AND_MEAN
/* Define to empty if `const' does not conform to ANSI C. */ /* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */ /* #undef const */
@@ -261,10 +261,6 @@
# define _SOCKADDR_LEN 1 # define _SOCKADDR_LEN 1
#endif #endif
#ifndef HAVE_INET_PTON
int inet_pton(int, const char *, void *);
#endif
#ifndef HAVE_STRLCAT #ifndef HAVE_STRLCAT
int strlcat(char *, const char *, int); int strlcat(char *, const char *, int);
#endif #endif

View File

@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="8,00" Version="9.00"
Name="dnet" Name="dnet"
ProjectGUID="{5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}" ProjectGUID="{5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}"
RootNamespace="dnet" RootNamespace="dnet"
Keyword="Win32Proj" Keyword="Win32Proj"
TargetFrameworkVersion="131072"
> >
<Platforms> <Platforms>
<Platform <Platform

View File

@@ -13,7 +13,6 @@
#endif #endif
#include <winsock2.h> #include <winsock2.h>
#include <ws2tcpip.h>
#include <iphlpapi.h> #include <iphlpapi.h>
#include <errno.h> #include <errno.h>

View File

@@ -6,10 +6,10 @@
* $Id: ip-win32.c,v 1.5 2005/01/25 21:30:40 dugsong Exp $ * $Id: ip-win32.c,v 1.5 2005/01/25 21:30:40 dugsong Exp $
*/ */
#ifdef _WIN32 #ifdef _WIN32
#include "dnet_winconfig.h" #include "dnet_winconfig.h"
#else #else
#include "config.h" #include "config.h"
#endif #endif
#include <winsock2.h> #include <winsock2.h>

View File

@@ -14,7 +14,6 @@
#include <winsock2.h> #include <winsock2.h>
#include <windows.h> #include <windows.h>
#include <ws2tcpip.h>
#include <iphlpapi.h> #include <iphlpapi.h>
#include <errno.h> #include <errno.h>

View File

@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="8,00" Version="9.00"
Name="liblua" Name="liblua"
ProjectGUID="{31FB0767-A71F-4575-8379-002D72B8AF86}" ProjectGUID="{31FB0767-A71F-4575-8379-002D72B8AF86}"
RootNamespace="liblua" RootNamespace="liblua"
Keyword="Win32Proj" Keyword="Win32Proj"
TargetFrameworkVersion="131072"
> >
<Platforms> <Platforms>
<Platform <Platform

View File

@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="8.00" Version="9.00"
Name="libpcre" Name="libpcre"
ProjectGUID="{5DE86C7A-DE72-4265-8807-4CA38F94F22A}" ProjectGUID="{5DE86C7A-DE72-4265-8807-4CA38F94F22A}"
Keyword="Win32Proj" Keyword="Win32Proj"
TargetFrameworkVersion="131072"
> >
<Platforms> <Platforms>
<Platform <Platform

View File

@@ -1,5 +1,5 @@
MAKENSIS="/c/apps/NSIS/makensis.exe" MAKENSIS="/c/apps/NSIS/makensis.exe"
VCEXPRESS="/c/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe" VCEXPRESS="/c/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"
export NMAP_VERSION := $(shell grep '^\#[ \t]*define[ \t]\+NMAP_VERSION' ../nmap.h | sed -e 's/.*"\(.*\)".*/\1/' -e 'q') export NMAP_VERSION := $(shell grep '^\#[ \t]*define[ \t]\+NMAP_VERSION' ../nmap.h | sed -e 's/.*"\(.*\)".*/\1/' -e 'q')
export NMAP_NUM_VERSION := $(shell grep '^\#[ \t]*define[ \t]\+NMAP_NUM_VERSION' ../nmap.h | sed -e 's/.*"\(.*\)".*/\1/' -e 'q') export NMAP_NUM_VERSION := $(shell grep '^\#[ \t]*define[ \t]\+NMAP_NUM_VERSION' ../nmap.h | sed -e 's/.*"\(.*\)".*/\1/' -e 'q')
COMMA_VERSION=$(shell echo $(NMAP_NUM_VERSION) | tr '.' ',') COMMA_VERSION=$(shell echo $(NMAP_NUM_VERSION) | tr '.' ',')

View File

@@ -100,6 +100,7 @@ typedef int ASN1_NULL;
#undef X509_EXTENSIONS #undef X509_EXTENSIONS
#undef X509_CERT_PAIR #undef X509_CERT_PAIR
#undef PKCS7_ISSUER_AND_SERIAL #undef PKCS7_ISSUER_AND_SERIAL
#undef OCSP_RESPONSE
#endif #endif
#ifdef BIGNUM #ifdef BIGNUM

View File

@@ -12,7 +12,7 @@
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 4,62,0,0 FILEVERSION 4,65,0,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x21L FILEFLAGS 0x21L
@@ -29,7 +29,7 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "Insecure.Org\0" VALUE "CompanyName", "Insecure.Org\0"
VALUE "FileDescription", "Nmap\0" VALUE "FileDescription", "Nmap\0"
VALUE "FileVersion", "4.62\0" VALUE "FileVersion", "4.65\0"
VALUE "InternalName", "Nmap\0" VALUE "InternalName", "Nmap\0"
VALUE "LegalCopyright", "Copyright (c) Insecure.Com LLC (fyodor@insecure.org)\0" VALUE "LegalCopyright", "Copyright (c) Insecure.Com LLC (fyodor@insecure.org)\0"
VALUE "LegalTrademarks", "NMAP\0" VALUE "LegalTrademarks", "NMAP\0"

View File

@@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 9.00 Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2005 # Visual C++ Express 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nmap", "nmap.vcproj", "{361719F0-AB42-4C93-9DE8-7D2144B96625}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nmap", "nmap.vcproj", "{361719F0-AB42-4C93-9DE8-7D2144B96625}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{FB7F6FD2-A39D-40A1-86DD-9B08370BDEA6} = {FB7F6FD2-A39D-40A1-86DD-9B08370BDEA6} {FB7F6FD2-A39D-40A1-86DD-9B08370BDEA6} = {FB7F6FD2-A39D-40A1-86DD-9B08370BDEA6}

View File

@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="8,00" Version="9.00"
Name="nmap" Name="nmap"
ProjectGUID="{361719F0-AB42-4C93-9DE8-7D2144B96625}" ProjectGUID="{361719F0-AB42-4C93-9DE8-7D2144B96625}"
RootNamespace="nmap" RootNamespace="nmap"
TargetFrameworkVersion="131072"
> >
<Platforms> <Platforms>
<Platform <Platform
@@ -46,6 +47,8 @@
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\liblua;.;..;../nbase;../libpcre;winip;..\nsock\include;&quot;pcap-include&quot;;&quot;..\libdnet-stripped\include&quot;;OpenSSL\include;" AdditionalIncludeDirectories="..\liblua;.;..;../nbase;../libpcre;winip;..\nsock\include;&quot;pcap-include&quot;;&quot;..\libdnet-stripped\include&quot;;OpenSSL\include;"
PreprocessorDefinitions="WIN32;_CONSOLE" PreprocessorDefinitions="WIN32;_CONSOLE"
GeneratePreprocessedFile="0"
KeepComments="false"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="1"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
@@ -61,6 +64,9 @@
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
/> />
<Tool
Name="VCResourceCompilerTool"
/>
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
@@ -77,6 +83,8 @@
ProgramDatabaseFile=".\Debug/nmap.pdb" ProgramDatabaseFile=".\Debug/nmap.pdb"
SubSystem="1" SubSystem="1"
OptimizeForWindows98="1" OptimizeForWindows98="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1" TargetMachine="1"
/> />
<Tool <Tool
@@ -97,9 +105,6 @@
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool
Name="VCWebDeploymentTool"
/>
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)..\scripts&quot; &quot;.\$(ConfigurationName)\scripts\&quot; /e /y &amp;&amp; xcopy &quot;$(SolutionDir)..\nselib\*.lua&quot; &quot;$(SolutionDir)\$(ConfigurationName)\nselib\&quot; /y &amp;&amp; xcopy &quot;$(SolutionDir)\OpenSSL\bin\*.dll&quot; &quot;$(SolutionDir)\$(ConfigurationName)\&quot; /y" CommandLine="xcopy &quot;$(SolutionDir)..\scripts&quot; &quot;.\$(ConfigurationName)\scripts\&quot; /e /y &amp;&amp; xcopy &quot;$(SolutionDir)..\nselib\*.lua&quot; &quot;$(SolutionDir)\$(ConfigurationName)\nselib\&quot; /y &amp;&amp; xcopy &quot;$(SolutionDir)\OpenSSL\bin\*.dll&quot; &quot;$(SolutionDir)\$(ConfigurationName)\&quot; /y"
@@ -152,6 +157,9 @@
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
/> />
<Tool
Name="VCResourceCompilerTool"
/>
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
@@ -167,6 +175,8 @@
ProgramDatabaseFile=".\Release/nmap.pdb" ProgramDatabaseFile=".\Release/nmap.pdb"
SubSystem="1" SubSystem="1"
OptimizeForWindows98="1" OptimizeForWindows98="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1" TargetMachine="1"
/> />
<Tool <Tool
@@ -187,9 +197,6 @@
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool
Name="VCWebDeploymentTool"
/>
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)..\scripts&quot; &quot;.\$(ConfigurationName)\scripts\&quot; /e /y &amp;&amp; xcopy &quot;$(SolutionDir)..\nselib\*.lua&quot; &quot;$(SolutionDir)\$(ConfigurationName)\nselib\&quot; /y &amp;&amp; xcopy &quot;$(SolutionDir)\OpenSSL\bin\*.dll&quot; &quot;$(SolutionDir)\$(ConfigurationName)\&quot; /y" CommandLine="xcopy &quot;$(SolutionDir)..\scripts&quot; &quot;.\$(ConfigurationName)\scripts\&quot; /e /y &amp;&amp; xcopy &quot;$(SolutionDir)..\nselib\*.lua&quot; &quot;$(SolutionDir)\$(ConfigurationName)\nselib\&quot; /y &amp;&amp; xcopy &quot;$(SolutionDir)\OpenSSL\bin\*.dll&quot; &quot;$(SolutionDir)\$(ConfigurationName)\&quot; /y"
@@ -256,11 +263,11 @@
> >
</File> </File>
<File <File
RelativePath="..\nse_init.cc" RelativePath="..\nse_fs.cc"
> >
</File> </File>
<File <File
RelativePath="..\nse_fs.cc" RelativePath="..\nse_init.cc"
> >
</File> </File>
<File <File
@@ -441,11 +448,11 @@
> >
</File> </File>
<File <File
RelativePath="..\nse_init.h" RelativePath="..\nse_fs.h"
> >
</File> </File>
<File <File
RelativePath="..\nse_fs.h" RelativePath="..\nse_init.h"
> >
</File> </File>
<File <File

View File

@@ -23,8 +23,8 @@
;Get installation folder from registry if available ;Get installation folder from registry if available
InstallDirRegKey HKCU "Software\Nmap" "" InstallDirRegKey HKCU "Software\Nmap" ""
!define VERSION "4.62" !define VERSION "4.65"
VIProductVersion "4.62.0.0" VIProductVersion "4.65.0.0"
VIAddVersionKey /LANG=1033 "FileVersion" "${VERSION}" VIAddVersionKey /LANG=1033 "FileVersion" "${VERSION}"
VIAddVersionKey /LANG=1033 "ProductName" "Nmap" VIAddVersionKey /LANG=1033 "ProductName" "Nmap"
VIAddVersionKey /LANG=1033 "CompanyName" "Insecure.org" VIAddVersionKey /LANG=1033 "CompanyName" "Insecure.org"

View File

@@ -27,10 +27,6 @@
#include <winsock2.h> #include <winsock2.h>
#ifndef __MINGW32__
#include <ws2tcpip.h>
#endif /* __MINGW32__ */
#define IN_MULTICAST(a) IN_CLASSD(a) #define IN_MULTICAST(a) IN_CLASSD(a)
#define IN_EXPERIMENTAL(a) ((((u_int32_t) (a)) & 0xf0000000) == 0xf0000000) #define IN_EXPERIMENTAL(a) ((((u_int32_t) (a)) & 0xf0000000) == 0xf0000000)

View File

@@ -61,5 +61,4 @@
#define caddr_t char* #define caddr_t char*
#define snprintf _snprintf #define snprintf _snprintf
#define vsnprintf _vsnprintf
#define inline __inline #define inline __inline

View File

@@ -3,7 +3,6 @@
#include <winsock2.h> #include <winsock2.h>
#include <windows.h> #include <windows.h>
#include <ws2tcpip.h>
#include <iphlpapi.h> #include <iphlpapi.h>
#ifndef EXTERNC #ifndef EXTERNC
@@ -34,3 +33,5 @@ EXTERNC void win_barf(const char *msg);
#endif #endif

View File

@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="8,00" Version="9.00"
Name="nse_bitlib" Name="nse_bitlib"
ProjectGUID="{FB7F6FD2-A39D-40A1-86DD-9B08370BDEA6}" ProjectGUID="{FB7F6FD2-A39D-40A1-86DD-9B08370BDEA6}"
RootNamespace="nse_bitlib" RootNamespace="nse_bitlib"
Keyword="Win32Proj" Keyword="Win32Proj"
TargetFrameworkVersion="131072"
> >
<Platforms> <Platforms>
<Platform <Platform
@@ -68,6 +69,8 @@
AdditionalLibraryDirectories="..\liblua" AdditionalLibraryDirectories="..\liblua"
GenerateDebugInformation="true" GenerateDebugInformation="true"
SubSystem="2" SubSystem="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1" TargetMachine="1"
/> />
<Tool <Tool
@@ -88,9 +91,6 @@
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool
Name="VCWebDeploymentTool"
/>
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)..\nselib-bin\*.dll&quot; &quot;$(SolutionDir)\$(ConfigurationName)\nselib-bin\&quot; /y" CommandLine="xcopy &quot;$(SolutionDir)..\nselib-bin\*.dll&quot; &quot;$(SolutionDir)\$(ConfigurationName)\nselib-bin\&quot; /y"
@@ -147,6 +147,8 @@
SubSystem="2" SubSystem="2"
OptimizeReferences="2" OptimizeReferences="2"
EnableCOMDATFolding="2" EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1" TargetMachine="1"
/> />
<Tool <Tool
@@ -167,9 +169,6 @@
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool
Name="VCWebDeploymentTool"
/>
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)..\nselib-bin\*.dll&quot; &quot;$(SolutionDir)\$(ConfigurationName)\nselib-bin\&quot; /y" CommandLine="xcopy &quot;$(SolutionDir)..\nselib-bin\*.dll&quot; &quot;$(SolutionDir)\$(ConfigurationName)\nselib-bin\&quot; /y"

View File

@@ -328,7 +328,7 @@ Traceroute::getTracePort (u8 proto, Target * t) {
u16 filtered_port = 1; u16 filtered_port = 1;
u16 port = 0; u16 port = 0;
int state = -1; int state = -1;
struct Port *np; Port *np;
/* Use the first specified port for ping traceroutes */ /* Use the first specified port for ping traceroutes */
if (o.pingscan) { if (o.pingscan) {