Skip to content

Commit f05296d

Browse files
committed
Merge changes from Nmap 7.80 release branch
1 parent 0b49f7f commit f05296d

File tree

14 files changed

+453
-327
lines changed

14 files changed

+453
-327
lines changed

CHANGELOG

+207-175
Large diffs are not rendered by default.

docs/nmap.usage.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Nmap 7.70SVN ( https://nmap.org )
1+
Nmap 7.80 ( https://nmap.org )
22
Usage: nmap [Scan Type(s)] [Options] {target specification}
33
TARGET SPECIFICATION:
44
Can pass hostnames, IP addresses, networks, etc.

mswin32/Makefile

+39-21
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MAKENSIS="/cygdrive/c/Program Files/NSIS/makensis.exe"
1+
MAKENSIS="/cygdrive/c/Program Files (x86)/NSIS/makensis.exe"
22
# VCExpress.exe is devenv.com with the commercial Visual Studio suite instead of VC++ Express
33
VCEXPRESS := $(shell reg query "HKEY_CLASSES_ROOT\\Applications\\devenv.exe\\shell\\edit\\command" | egrep -i '[A-Z]:\\' | cut -d\" -f2 | sed 's%\\%/%g' | tr -d '\r\n')
44
SIGNTOOL := $(shell reg query "HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.1" /v "InstallationFolder" | egrep InstallationFolder | cut -d ' ' -f13- | sed 's%\\%/%g' | tr -d '\r\n' | sed 's%$$%bin/x86/signtool.exe%')
@@ -7,44 +7,58 @@ export NMAP_NUM_VERSION := $(shell grep '^\#[ \t]*define[ \t]\+NMAP_NUM_VERSION'
77
export NPCAP_VERSION := $(shell ls npcap-*.exe | sed -e 's/npcap-\([-r0-9.]*\)\.exe/\1/' -e 'q')
88
COMMA_VERSION=$(shell echo $(NMAP_NUM_VERSION) | tr '.' ',')
99
LOGLOC=c:nmapbuild.log
10-
NSE_FILES = scripts/script.db scripts/*.nse
10+
NSE_FILES = ../scripts/script.db ../scripts/*.nse
1111
NMAP_MSWIN32_AUX = ../../nmap-mswin32-aux
1212
SIGNTOOL_ARGS = sign /a /n "Insecure.Com LLC" /tr http://timestamp.digicert.com /td sha256 /fd sha256
1313
# escape quotes for NSIS
1414
# escape for right side of sed regex replace
1515
SIGNTOOL_SUBST = $(shell echo '"$(SIGNTOOL)" $(SIGNTOOL_ARGS)' | sed -e 's/"/$$\\"/g' -e 's/[\/&]/\\&/g' )
1616

17+
PRODUCT_NAME=Nmap
18+
PLATFORM=Win32
19+
BASE_CONFIG=Release
20+
VCCONFIG=$(BASE_CONFIG)
21+
NSIS_DEFINES=
22+
ifdef NMAP_OEM
23+
PRODUCT_NAME=Nmap OEM
24+
OEM_SUFFIX=-oem
25+
VCCONFIG=$(BASE_CONFIG)OEM
26+
NSIS_DEFINES="/DNMAP_OEM=1"
27+
endif
28+
1729
bundle-nmap: bundle-zip bundle-nsis
1830

1931
build-nmap: nmap.sln nmap.rc
20-
"$(VCEXPRESS)" nmap.sln /build release /out $(LOGLOC)
32+
"$(VCEXPRESS)" nmap.sln /build "$(VCCONFIG)|$(PLATFORM)" /out $(LOGLOC)
2133
#"$(VCEXPRESS)" nmap.sln /build release /project nmap-update /out $(LOGLOC)
2234

2335
stage-nmap: build-nmap LICENSE
2436
rm -rf nmap-$(NMAP_VERSION)
2537
mkdir nmap-$(NMAP_VERSION)
26-
cd Release && cp -r ../../CHANGELOG ../../COPYING nmap-mac-prefixes nmap-os-db nmap-payloads nmap-protocols nmap-rpc nmap-service-probes nmap-services nmap.exe nmap.xsl nse_main.lua ../nmap_performance.reg ../../README-WIN32 ../../docs/3rd-party-licenses.txt ../nmap-$(NMAP_VERSION)/
38+
cp ../CHANGELOG ../COPYING ../nmap-mac-prefixes ../nmap-os-db ../nmap-payloads ../nmap-protocols ../nmap-rpc ../nmap-service-probes ../nmap-services $(VCCONFIG)/nmap.exe ../docs/nmap.xsl ../nse_main.lua nmap_performance.reg ../README-WIN32 ../docs/3rd-party-licenses.txt nmap-$(NMAP_VERSION)/
2739
# Use "cmd /c copy" rather than "cp" to preserve Windows ACLs. Using
2840
# "cp" means that the copied DLLs don't have the same ACL and cause an
2941
# error on startup: 0xc0000022.
3042
cmd /c copy $(subst /,\\,$(NMAP_MSWIN32_AUX))\\OpenSSL\\bin\\*.dll nmap-$(NMAP_VERSION)
31-
cmd /c copy Release\\libssh2.dll Release\\zlibwapi.dll nmap-$(NMAP_VERSION)
43+
cmd /c copy ..\\libssh2\\win32\\$(BASE_CONFIG)_dll\\libssh2.dll nmap-$(NMAP_VERSION)
44+
cmd /c copy ..\\libz\\contrib\\vstudio\\vc12\\x86\\ZlibDll$(BASE_CONFIG)\\zlibwapi.dll nmap-$(NMAP_VERSION)
3245
mkdir nmap-$(NMAP_VERSION)/scripts
33-
cd Release && cp -f $(NSE_FILES) ../nmap-$(NMAP_VERSION)/scripts/
34-
cd Release && for f in `find nselib -name .svn -prune -o -type d -print`; do \
35-
mkdir -p ../nmap-$(NMAP_VERSION)/$$f; \
46+
cp -f $(NSE_FILES) nmap-$(NMAP_VERSION)/scripts/
47+
for f in `cd .. && find nselib -name .svn -prune -o -type d -print`; do \
48+
mkdir -p nmap-$(NMAP_VERSION)/$$f; \
3649
done
37-
cd Release && for f in `find nselib -name .svn -prune -o -type f -print`; do \
38-
cp -f $$f ../nmap-$(NMAP_VERSION)/$$f; \
50+
for f in `cd .. && find nselib -name .svn -prune -o -type f -print`; do \
51+
cp -f ../$$f nmap-$(NMAP_VERSION)/$$f; \
3952
done
40-
cd Release && cp -r ../../docs/licenses ../nmap-$(NMAP_VERSION)/
53+
cp -r ../docs/licenses nmap-$(NMAP_VERSION)/
4154
rm -rf nmap-$(NMAP_VERSION)/licenses/.svn
42-
cp npcap-$(NPCAP_VERSION).exe nmap-$(NMAP_VERSION)
55+
# TODO: change "-oem" to "$(OEM_SUFFIX)" when Npcap OEM is no longer needed for standard Nmap.
56+
cp npcap-$(NPCAP_VERSION)-oem.exe nmap-$(NMAP_VERSION)
4357
cp $(NMAP_MSWIN32_AUX)/vcredist_x86.exe nmap-$(NMAP_VERSION)
4458
cp $(NMAP_MSWIN32_AUX)/vcredist2008_x86.exe nmap-$(NMAP_VERSION)
45-
cp ../ncat/Release/ncat.exe nmap-$(NMAP_VERSION)
46-
cp ../ncat/Release/ca-bundle.crt nmap-$(NMAP_VERSION)
47-
cp ../nping/Release/nping.exe nmap-$(NMAP_VERSION)
59+
cp ../ncat/$(BASE_CONFIG)/ncat.exe nmap-$(NMAP_VERSION)
60+
cp ../ncat/$(BASE_CONFIG)/ca-bundle.crt nmap-$(NMAP_VERSION)
61+
cp ../nping/$(BASE_CONFIG)/nping.exe nmap-$(NMAP_VERSION)
4862
#cp ../nmap-update/Release/nmap-update.exe nmap-$(NMAP_VERSION)
4963
# Install the ndiff batch file wrapper in the zip distribution.
5064
cp ../ndiff/ndiff.py nmap-$(NMAP_VERSION)/ndiff.py
@@ -61,25 +75,27 @@ sign-files: nmap-$(NMAP_VERSION)/nmap.exe nmap-$(NMAP_VERSION)/ncat.exe nmap-$(N
6175

6276
bundle-nsis: nsis/Nmap.nsi sign-files
6377
cp nsis/AddToPath.nsh nsis/Nmap.nsi nsis/shortcuts.ini nsis/final.ini nmap-$(NMAP_VERSION)
64-
$(MAKENSIS) nmap-$(NMAP_VERSION)/Nmap.nsi
65-
mv nmap-$(NMAP_VERSION)/NmapInstaller.exe nmap-$(NMAP_VERSION)-setup.exe
66-
"$(SIGNTOOL)" $(SIGNTOOL_ARGS) nmap-$(NMAP_VERSION)-setup.exe
78+
$(MAKENSIS) "/XOutFile nmap-$(NMAP_VERSION)$(OEM_SUFFIX)-setup.exe" $(NSIS_DEFINES) nmap-$(NMAP_VERSION)/Nmap.nsi
79+
mv nmap-$(NMAP_VERSION)/nmap-$(NMAP_VERSION)$(OEM_SUFFIX)-setup.exe .
80+
"$(SIGNTOOL)" $(SIGNTOOL_ARGS) nmap-$(NMAP_VERSION)$(OEM_SUFFIX)-setup.exe
6781

6882
bundle-zip: sign-files
69-
rm -f nmap-$(NMAP_VERSION)-win32.zip
83+
rm -f nmap-$(NMAP_VERSION)$(OEM_SUFFIX)-win32.zip
7084
zip -x nmap-$(NMAP_VERSION)/ZENMAP_README nmap-$(NMAP_VERSION)/zenmap/\* \
7185
nmap-$(NMAP_VERSION)/zenmap.exe nmap-$(NMAP_VERSION)/share/\* \
7286
nmap-$(NMAP_VERSION)/python27.dll nmap-$(NMAP_VERSION)/py2exe/\* \
7387
nmap-$(NMAP_VERSION)/COPYING_HIGWIDGETS nmap-$(NMAP_VERSION)/w9xpopen.exe \
88+
nmap-$(NMAP_VERSION)/vcredist2008_x86.exe \
7489
nmap-$(NMAP_VERSION)/ndiff.exe nmap-$(NMAP_VERSION)/\*.ini \
7590
nmap-$(NMAP_VERSION)/Uninstall.exe nmap-$(NMAP_VERSION)/\*.nsi \
7691
nmap-$(NMAP_VERSION)/\*.nsh \
77-
-r nmap-$(NMAP_VERSION)-win32.zip nmap-$(NMAP_VERSION)
92+
-r nmap-$(NMAP_VERSION)$(OEM_SUFFIX)-win32.zip nmap-$(NMAP_VERSION)
7893

7994
nmap.rc: nmap.rc.in ../nmap.h
8095
sed -e '1i// Automatically generated from $<.' \
8196
-e 's/@@FILEVERSION@@/"$(NMAP_VERSION)\\0"/' \
8297
-e 's/@@COMMAVERSION@@/$(COMMA_VERSION)/' \
98+
-e 's/@@PRODUCT_NAME@@/$(PRODUCT_NAME)/' \
8399
"$<" > "$@"
84100

85101
nsis/Nmap.nsi: nsis/Nmap.nsi.in ../nmap.h
@@ -89,11 +105,13 @@ nsis/Nmap.nsi: nsis/Nmap.nsi.in ../nmap.h
89105
-e 's/@@VERSION@@/"$(NMAP_VERSION)"/' \
90106
-e 's/@@NPCAP_VERSION@@/$(NPCAP_VERSION)/' \
91107
-e 's/@@SIGNTOOL@@/$(SIGNTOOL_SUBST)/' \
108+
-e 's/@@OEM_SUFFIX@@/$(OEM_SUFFIX)/' \
109+
-e 's/@@PRODUCT_NAME@@/$(PRODUCT_NAME)/' \
92110
"$<" > "$@"
93111

94112
LICENSE: ../COPYING
95113
./license-format/licformat.sh "$<" > "$@"
96114

97115
clean:
98116
"$(VCEXPRESS)" nmap.sln /clean
99-
rm -rf Debug Release nmapbuild.log nmap.rc nsis/Nmap.nsi LICENSE
117+
rm -rf Debug Release ReleaseOEM nmapbuild.log nmap.rc nsis/Nmap.nsi LICENSE

mswin32/nmap.rc

-54
This file was deleted.

mswin32/nmap.rc.in

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ BEGIN
2828
BLOCK "040904b0"
2929
BEGIN
3030
VALUE "CompanyName", "Insecure.Org\0"
31-
VALUE "FileDescription", "Nmap\0"
31+
VALUE "FileDescription", "@@PRODUCT_NAME@@\0"
3232
VALUE "FileVersion", @@FILEVERSION@@
33-
VALUE "InternalName", "Nmap\0"
33+
VALUE "InternalName", "@@PRODUCT_NAME@@\0"
3434
VALUE "LegalCopyright", "Copyright (c) Insecure.Com LLC ([email protected])\0"
3535
VALUE "LegalTrademarks", "NMAP\0"
3636
VALUE "OriginalFilename", "nmap.exe\0"
37-
VALUE "ProductName", "Nmap\0"
37+
VALUE "ProductName", "@@PRODUCT_NAME@@\0"
3838
END
3939
END
4040
BLOCK "VarFileInfo"

0 commit comments

Comments
 (0)