diff --git a/CHANGELOG b/CHANGELOG index 785a3838e..0c8419d0d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -13,47 +13,128 @@ o [NSE][GH#1665] The HTTP library no longer crashes when code requests digest authentication but the server does not provide the necessary authentication header. [nnposter] -o [NSE][GH#1648] CR characters (0x0D) are no longer treated as illegal - in script XML output. [nnposter] +Nmap 7.80 [2019-08-10] -o [GH#1659] Allow resuming nmap scan with lengthy command line - [Clément Notin] +o [Windows] The Npcap Windows packet capturing library (https://npcap.org/) + is faster and more stable than ever. Nmap 7.80 updates the bundled Npcap + from version 0.99-r2 to 0.9982, including all of these changes from the + last 15 Npcap releases: https://nmap.org/npcap/changelog + +o [NSE] Added 11 NSE scripts, from 8 authors, bringing the total up to 598! + They are all listed at https://nmap.org/nsedoc/, and the summaries are + below: + + + [GH#1232] broadcast-hid-discoveryd discovers HID devices on a LAN by + sending a discoveryd network broadcast probe. [Brendan Coles] + + + [GH#1236] broadcast-jenkins-discover discovers Jenkins servers on a LAN + by sending a discovery broadcast probe. [Brendan Coles] + + + [GH#1016][GH#1082] http-hp-ilo-info extracts information from HP + Integrated Lights-Out (iLO) servers. [rajeevrmenon97] + + + [GH#1243] http-sap-netweaver-leak detects SAP Netweaver Portal with the + Knowledge Management Unit enabled with anonymous access. [ArphanetX] + + + https-redirect detects HTTP servers that redirect to the same port, but + with HTTPS. Some nginx servers do this, which made ssl-* scripts not run + properly. [Daniel Miller] + + + [GH#1504] lu-enum enumerates Logical Units (LU) of TN3270E servers. + [Soldier of Fortran] + + + [GH#1633] rdp-ntlm-info extracts Windows domain information from RDP + services. [Tom Sellers] + + + smb-vuln-webexec checks whether the WebExService is installed and allows + code execution. [Ron Bowes] + + + smb-webexec-exploit exploits the WebExService to run arbitrary commands + with SYSTEM privileges. [Ron Bowes] + + + [GH#1457] ubiquiti-discovery extracts information from the Ubiquiti + Discovery service and assists version detection. [Tom Sellers] + + + [GH#1126] vulners queries the Vulners CVE database API using CPE + information from Nmap's service and application version detection. + [GMedian, Daniel Miller] + +o [GH#1291][GH#34][GH#1339] Use pcap_create instead of pcap_live_open in + Nmap, and set immediate mode on the pcap descriptor. This solves packet + loss problems on Linux and may improve performance on other platforms. + [Daniel Cater, Mike Pontillo, Daniel Miller] + +o [NSE] Collected utility functions for string processing into a new + library, stringaux.lua. [Daniel Miller] + +o [NSE] New rand.lua library uses the best sources of random available on + the system to generate random strings. [Daniel Miller] o [NSE] New library, oops.lua, makes reporting errors easy, with plenty of debugging detail when needed, and no clutter when not. [Daniel Miller] -o [NSE][GH#1126] New script vulners.nse queries the Vulners CVE database API - using CPE information from Nmap's service and application version detection. - [GMedian, Daniel Miller] +o [NSE] Collected utility functions for manipulating and searching tables + into a new library, tableaux.lua. [Daniel Miller] -o [NSE][GH#1633] New script rdp-ntlm-info.nse allows extraction of Windows - domain information from RDP services. Information extracted and format - of output is the same as other *-ntlm-info scripts. [Tom Sellers] - -o [NSE][GH#1614] Add TLS support to rdp-enum-encryption. Enables determining - protocol version against servers that require TLS and lays ground work for - some NLA/CredSSP information collection. [Tom Sellers] - -o [NSE][GH#1611] Address two protocol parsing issues in rdp-enum-encryption and - the RDP nse library which broke scanning of Windows XP. Clarify protocol - types [Tom Sellers] - -o [NSE][GH#1608] Script http-fileupload-exploiter failed to locate its resource - file unless executed from a specific working directory. [nnposter] +o [NSE] New knx.lua library holds common functions and definitions for + communicating with KNX/Konnex devices. [Daniel Miller] o [NSE][GH#1571] The HTTP library now provides transparent support for gzip- encoded response body. (See https://github.com/nmap/nmap/pull/1571 for an overview.) [nnposter] -o [NSE][GH#1571] The HTTP library is now enforcing a size limit on the received - response body. The default limit can be adjusted with a script argument, - which applies to all scripts, and can be overridden case-by-case with an HTTP - request option. (See https://github.com/nmap/nmap/pull/1571 for details.) - [nnposter] +o [Nsock][Ncat][GH#1075] Add AF_VSOCK (Linux VM sockets) functionality to + Nsock and Ncat. VM sockets are used for communication between virtual + machines and the hypervisor. [Stefan Hajnoczi] -o [Nsock][Ncat][GH#1075] Add AF_VSOCK (Linux VM sockets) functionality to Nsock - and Ncat. VM sockets are used for communication between virtual machines and - the hypervisor. [Stefan Hajnoczi] +o [Security][Windows] Address CVE-2019-1552 in OpenSSL by building with the + prefix "C:\Program Files (x86)\Nmap\OpenSSL". This should prevent + unauthorized users from modifying OpenSSL defaults by writing + configuration to this directory. + +o [Security][GH#1147][GH#1108] Reduced LibPCRE resource limits so that + version detection can't use as much of the stack. Previously Nmap could + crash when run on low-memory systems against target services which are + intentionally or accidentally difficult to match. Someone assigned + CVE-2018-15173 for this issue. [Daniel Miller] + +o [GH#1361] Deprecate and disable the -PR (ARP ping) host discovery + option. ARP ping is already used whenever possible, and the -PR option + would not force it to be used in any other case. [Daniel Miller] + +o [NSE] bin.lua is officially deprecated. Lua 5.3, added 2 years ago in Nmap + 7.25BETA2, has native support for binary data packing via string.pack and + string.unpack. All existing scripts and libraries have been updated. + [Daniel Miller] + +o [NSE] Completely removed the bit.lua NSE library. All of its functions are + replaced by native Lua bitwise operations, except for `arshift` + (arithmetic shift) which has been moved to the bits.lua library. [Daniel + Miller] + +o [NSE][GH#1571] The HTTP library is now enforcing a size limit on the + received response body. The default limit can be adjusted with a script + argument, which applies to all scripts, and can be overridden case-by-case + with an HTTP request option. (See https://github.com/nmap/nmap/pull/1571 + for details.) [nnposter] + +o [NSE][GH#1648] CR characters are no longer treated as illegal in script + XML output. [nnposter] + +o [GH#1659] Allow resuming nmap scan with lengthy command line [Clément + Notin] + +o [NSE][GH#1614] Add TLS support to rdp-enum-encryption. Enables determining + protocol version against servers that require TLS and lays ground work for + some NLA/CredSSP information collection. [Tom Sellers] + +o [NSE][GH#1611] Address two protocol parsing issues in rdp-enum-encryption + and the RDP nse library which broke scanning of Windows XP. Clarify + protocol types [Tom Sellers] + +o [NSE][GH#1608] Script http-fileupload-exploiter failed to locate its + resource file unless executed from a specific working + directory. [nnposter] o [NSE][GH#1467] Avoid clobbering the "severity" and "ignore_404" values of fingerprints in http-enum. None of the standard fingerprints uses these @@ -62,109 +143,89 @@ o [NSE][GH#1467] Avoid clobbering the "severity" and "ignore_404" values of o [NSE][GH#1077] Fix a crash caused by a double-free of libssh2 session data when running SSH NSE scripts against non-SSH services. [Seth Randall] -o [NSE][GH#1565] Updates the execution rule of the mongodb scripts to be able - to run on alternate ports. [Paulino Calderon] +o [NSE][GH#1565] Updates the execution rule of the mongodb scripts to be + able to run on alternate ports. [Paulino Calderon] -o [Ncat][GH#1560] Allow Ncat to connect to servers on port 0, provided that the - socket implementation allows this. [Daniel Miller] +o [Ncat][GH#1560] Allow Ncat to connect to servers on port 0, provided that + the socket implementation allows this. [Daniel Miller] o Update the included libpcap to 1.9.0. [Daniel Miller] o [NSE][GH#1544] Fix a logic error that resulted in scripts not honoring the - smbdomain script-arg when the target provided a domain in the NTLM challenge. - [Daniel Miller] + smbdomain script-arg when the target provided a domain in the NTLM + challenge. [Daniel Miller] -o [Nsock][GH#1543] Avoid a crash (Protocol not supported) caused by trying to - reconnect with SSLv2 when an error occurs during DTLS connect. [Daniel Miller] +o [Nsock][GH#1543] Avoid a crash (Protocol not supported) caused by trying + to reconnect with SSLv2 when an error occurs during DTLS connect. [Daniel + Miller] -o [NSE][GH#1016][GH#1082] New script http-hp-ilo-info to extract information - from HP Integrated Lights-Out (iLO) servers. [rajeevrmenon97] - -o [NSE][GH#1534] Removed OSVDB references from scripts and replaced them with - BID references where possible. [nnposter] - -o [NSE][GH#1504] New script lu-enum.nse attempts to enumerate Logical Units - (LU) of TN3270E servers. [Soldier of Fortran] +o [NSE][GH#1534] Removed OSVDB references from scripts and replaced them + with BID references where possible. [nnposter] o [NSE][GH#1504] Updates TN3270.lua and adds argument to disable TN3270E [Soldier of Fortran] -o [GH#1504] RMI parser could crash when encountering invalid input - [Clément Notin] +o [GH#1504] RMI parser could crash when encountering invalid input [Clément + Notin] o [GH#863] Avoid reporting negative latencies due to matching an ARP or ND response to a probe sent after it was recieved. [Daniel Miller] -o [ncat][GH#1441] To avoid confusion and to support default proxy ports, +o [Ncat][GH#1441] To avoid confusion and to support non-default proxy ports, option --proxy now requires a literal IPv6 address to be specified using - square-bracket notation, such as --proxy [2001:db8::123]:456. [nnposter] + square-bracket notation, such as --proxy [2001:db8::123]:456. [nnposter] -o [ncat][GH#1214][GH#1230][GH#1439] New ncat option provides control over +o [Ncat][GH#1214][GH#1230][GH#1439] New ncat option provides control over whether proxy destinations are resolved by the remote proxy server or locally, by Ncat itself. See option --proxy-dns. [nnposter] -o [NSE][GH#1478] Updated script ftp-syst to prevent potential endless looping. - [nnposter] - -o [NSE][GH#1457] New script, ubiquiti-discovery, which extracts information from - the Ubiquiti Discovery service and assists version detection. [Tom Sellers] +o [NSE][GH#1478] Updated script ftp-syst to prevent potential endless + looping. [nnposter] o [GH#1454] New service probes and match lines for v1 and v2 of the Ubiquiti Discovery protocol. Devices often leave the related service open and it - exposes significant amounts of information as well as the risk of being used - as part of a DDoS. New nmap-payload entry for v1 of the protocol. [Tom Sellers] + exposes significant amounts of information as well as the risk of being + used as part of a DDoS. New nmap-payload entry for v1 of the + protocol. [Tom Sellers] -o [NSE] Removes hostmap-ip2hosts.nse as the API has been broken for a while - and the service will be completely shutdown on Feb 17th. [Paulino Calderon] +o [NSE] Removed hostmap-ip2hosts.nse as the API has been broken for a while + and the service was completely shutdown on Feb 17th, 2019. [Paulino + Calderon] -o [NSE][GH#1318] Adds TN3270E support and additional improvements to tn3270.lua - and updates tn3270-screen.nse to display the new setting. [mainframed] +o [NSE][GH#1318] Adds TN3270E support and additional improvements to + tn3270.lua and updates tn3270-screen.nse to display the new + setting. [mainframed] -o [NSE][GH#1346] Updates product codes and adds a check for response length in - enip-info.nse. The script now uses string.unpack. [NothinRandom] +o [NSE][GH#1346] Updates product codes and adds a check for response length + in enip-info.nse. The script now uses string.unpack. [NothinRandom] -o [Ncat][GH#1310][GH#1409] Temporary RSA keys are now 2048-bit to resolve - a compatibility issue with OpenSSL library configured with security level 2, - as seen on current Debian or Kali. - [Adrian Vollmer, nnposter] +o [Ncat][GH#1310][GH#1409] Temporary RSA keys are now 2048-bit to resolve a + compatibility issue with OpenSSL library configured with security level 2, + as seen on current Debian or Kali. [Adrian Vollmer, nnposter] o [NSE][GH#1227] Fix a crash (double-free) when using SSH scripts against non-SSH services. [Daniel Miller] -o [Zenmap] Fix a crash when Nmap executable cannot be found and the system PATH - contains non-UTF-8 bytes, such as on Windows. [Daniel Miller] +o [Zenmap] Fix a crash when Nmap executable cannot be found and the system + PATH contains non-UTF-8 bytes, such as on Windows. [Daniel Miller] o [Zenmap] Fix a crash in results search when using the dir: operator: - AttributeError: 'SearchDB' object has no attribute 'match_dir' - [Daniel Miller] + AttributeError: 'SearchDB' object has no attribute 'match_dir' [Daniel + Miller] o [Ncat][GH#1372] Fixed an issue with Ncat -e on Windows that caused early termination of connections. [Alberto Garcia Illera] -o [GH#1361] Deprecate and disable the -PR (ARP ping) host discovery option. ARP - ping is already used whenever possible, and the -PR option would not force it - to be used in any other case. [Daniel Miller] +o [NSE][GH#1359] Fix a false-positive in http-phpmyadmin-dir-traversal when + the server responds with 200 status to a POST request to any + URI. [Francesco Soncina] -o [NSE][GH#1243] Added http-sap-netweaver-leak to detect SAP Netweaver Portal - with the Knowledge Management Unit enabled with anonymous access. [ArphanetX] +o [NSE] New vulnerability state in vulns.lua, UNKNOWN, is used to indicate + that testing could not rule out vulnerability. [Daniel Miller] -o [NSE] Collected utility functions for string processing into a new library, - stringaux.lua. [Daniel Miller] - -o [NSE][GH#1359] Fix a false-positive in http-phpmyadmin-dir-traversal when the - server responds with 200 status to a POST request to any URI. [Francesco Soncina] - -o [NSE] New vulnerability state in vulns.lua, UNKNOWN, is used to indicate that - testing could not rule out vulnerability. [Daniel Miller] - -o [NSE] New rand.lua library uses the best sources of random available on the - system to generate random strings. [Daniel Miller] - -o [NSE] Collected utility functions for manipulating and searching tables into - a new library, tableaux.lua. [Daniel Miller] - -o [GH#1355] When searching for Lua header files, actually use them where they - are found instead of forcing /usr/include. [Fabrice Fontaine, Daniel Miller] +o [GH#1355] When searching for Lua header files, actually use them where + they are found instead of forcing /usr/include. [Fabrice Fontaine, Daniel + Miller] o [NSE][GH#1331] Script traceroute-geolocation no longer crashes when www.GeoPlugin.net returns null coordinates [Michal Kubenka, nnposter] @@ -172,45 +233,25 @@ o [NSE][GH#1331] Script traceroute-geolocation no longer crashes when o Limit verbose -v and debugging -d levels to a maximum of 10. Nmap does not use higher levels internally. [Daniel Miller] -o [NSE] bin.lua is officially deprecated. Lua 5.3, added 2 years ago in Nmap - 7.25BETA2, has native support for binary data packing via string.pack and - string.unpack. All existing scripts and libraries have been updated. - [Daniel Miller] +o [NSE] tls.lua when creating a client_hello message will now only use a + SSLv3 record layer if the protocol version is SSLv3. Some TLS + implementations will not handshake with a client offering less than + TLSv1.0. Scripts will have to manually fall back to SSLv3 to talk to + SSLv3-only servers. [Daniel Miller] -o [NSE] tls.lua when creating a client_hello message will now only use a SSLv3 - record layer if the protocol version is SSLv3. Some TLS implementations will - not handshake with a client offering less than TLSv1.0. Scripts will have to - manually fall back to SSLv3 to talk to SSLv3-only servers. [Daniel Miller] +o [NSE][GH#1322] Fix a few false-positive conditions in + ssl-ccs-injection. TLS implementations that responded with fatal alerts + other than "unexpected message" had been falsely marked as + vulnerable. [Daniel Miller] -o [NSE][GH#1322] Fix a few false-positive conditions in ssl-ccs-injection. TLS - implementations that responded with fatal alerts other than "unexpected - message" had been falsely marked as vulnerable. [Daniel Miller] +o Emergency fix to Nmap's birthday announcement so Nmap wishes itself a + "Happy 21st Birthday" rather than "Happy 21th" in verbose mode (-v) on + September 1, 2018. [Daniel Miller] -o Emergency fix to Nmap's birthday announcement so Nmap wishes itself - a "Happy 21st Birthday" rather than "Happy 21th" in verbose mode - (-v) on September 1, 2018. [Daniel Miller] - -o [NSE] New knx.lua library holds common functions and definitions for - communicating with KNX/Konnex devices. [Daniel Miller] - -o [NSE] Completely removed the bit.lua NSE library. All of its functions are - replaced by native Lua bitwise operations, except for `arshift` (arithmetic - shift) which has been moved to the bits.lua library. [Daniel Miller] - -o [GH#1291][GH#34][GH#1339] Use pcap_create instead of pcap_live_open in Nmap, - and set immediate mode on the pcap descriptor. This solves packet loss - problems on Linux and may improve performance on other platforms. - [Daniel Cater, Mike Pontillo, Daniel Miller] - -o [GH#1150] Start host timeout clocks when the first probe is sent to a host, - not when the hostgroup is started. Sometimes a host doesn't get probes until - late in the hostgroup, increasing the chance it will time out. [jsiembida] - -o [GH#1147][GH#1108] Reduced LibPCRE resource limits so that version detection - can't use as much of the stack. Previously Nmap could crash when run on - low-memory systems against target services which are intentionally or - accidentally difficult to match. Someone assigned CVE-2018-15173 for this - issue. [Daniel Miller] +o [GH#1150] Start host timeout clocks when the first probe is sent to a + host, not when the hostgroup is started. Sometimes a host doesn't get + probes until late in the hostgroup, increasing the chance it will time + out. [jsiembida] o [NSE] Support for edns-client-subnet (ECS) in dns.lua has been improved by: - [GH#1271] Using ECS code compliant with RFC 7871 [John Bond] @@ -218,65 +259,51 @@ o [NSE] Support for edns-client-subnet (ECS) in dns.lua has been improved by: - Fixing a bug that prevented using the same ECS option table more than once [nnposter] -o [Ncat][GH#1267] Fixed communication with commands launched with -e or -c on - Windows, especially when --ssl is used. [Daniel Miller] +o [Ncat][GH#1267] Fixed communication with commands launched with -e or -c + on Windows, especially when --ssl is used. [Daniel Miller] -o Upgraded included libpcap to 1.8.1 [Daniel Miller] +o [NSE] Script http-default-accounts can now select more than one + fingerprint category. It now also possible to select fingerprints by name + to support very specific scanning. [nnposter] -o [NSE] Script http-default-accounts can now select more than one fingerprint - category. It now also possible to select fingerprints by name to support very - specific scanning. [nnposter] +o [NSE] Script http-default-accounts was not able to run against more than + one target host/port. [nnposter] -o [NSE] Script http-default-accounts was not able to run against more than one - target host/port. [nnposter] +o [NSE][GH#1251] New script-arg `http.host` allows users to force a + particular value for the Host header in all HTTP requests. -o [NSE][GH#1251] New script-arg `http.host` allows users to force a particular - value for the Host header in all HTTP requests. +o [NSE][GH#1258] Use smtp.domain script arg or target's domain name instead + of "example.com" in EHLO command used for STARTTLS. [gwire] -o [NSE][GH#1258] Use smtp.domain script arg or target's domain name instead of - "example.com" in EHLO command used for STARTTLS. [gwire] +o [NSE][GH#1233] Fix brute.lua's BruteSocket wrapper, which was crashing + Nmap with an assertion failure due to socket mixup [Daniel Miller]: nmap: + nse_nsock.cc:672: int receive_buf(lua_State*, int, lua_KContext): + Assertion `lua_gettop(L) == 7' failed. -o [NSE][GH#1233] Fix brute.lua's BruteSocket wrapper, which was crashing Nmap - with an assertion failure due to socket mixup [Daniel Miller]: - nmap: nse_nsock.cc:672: int receive_buf(lua_State*, int, lua_KContext): Assertion `lua_gettop(L) == 7' failed. +o [NSE][GH#1254] Handle an error condition in smb-vuln-ms17-010 caused by + IPS closing the connection. [Clément Notin] -o [NSE][GH#1254] Handle an error condition in smb-vuln-ms17-010 caused by IPS - closing the connection. [Clément Notin] - -o [NSE] https-redirect detects HTTP servers that redirect to the same port, but - with HTTPS. Some nginx servers do this, which made ssl-* scripts not run - properly. [Daniel Miller] - -o [NSE][GH#1236] Added broadcast-jenkins-discover to discover Jenkins servers - on a LAN by sending a discovery broadcast probe. [Brendan Coles] - -o [NSE][GH#1232] Added broadcast-hid-discoveryd to discover HID devices - on a LAN by sending a discoveryd network broadcast probe. [Brendan Coles] - -o New service probe and match lines for adb, the Android Debug Bridge, which - allows remote code execution and is left enabled by default on many devices. - [Daniel Miller] - -o [Ncat][GH#1237] Fixed literal IPv6 URL format for connecting through - HTTP proxies. [Phil Dibowitz] +o [Ncat][GH#1237] Fixed literal IPv6 URL format for connecting through HTTP + proxies. [Phil Dibowitz] o [NSE][GH#1212] Updates vendors from ODVA list for enip-info. [NothinRandom] o [NSE][GH#1191] Add two common error strings that improve MySQL detection by the script http-sql-injection. [Robert Taylor, Paulino Calderon] -o [NSE][GH#1220] Fix bug in http-vuln-cve2006-3392 that prevented the script to - generate the vulnerability report correctly. [rewardone] +o [NSE][GH#1220] Fix bug in http-vuln-cve2006-3392 that prevented the script + to generate the vulnerability report correctly. [rewardone] -o [NSE][GH#1218] Fix bug related to screen rendering in NSE library tn3270. This - patch also improves the brute force script tso-brute. [mainframed] +o [NSE][GH#1218] Fix bug related to screen rendering in NSE library + tn3270. This patch also improves the brute force script + tso-brute. [mainframed] -o [NSE][GH#1209] Fix SIP, SASL, and HTTP Digest authentication when - the algorithm contains lowercase characters. [Jeswin Mathai] +o [NSE][GH#1209] Fix SIP, SASL, and HTTP Digest authentication when the + algorithm contains lowercase characters. [Jeswin Mathai] o [GH#1204] Nmap could be fooled into ignoring TCP response packets if they - used an unknown TCP Option, which would misalign the validation, causing it - to fail. [Clément Notin, Daniel Miller] + used an unknown TCP Option, which would misalign the validation, causing + it to fail. [Clément Notin, Daniel Miller] o [NSE]The HTTP response parser now tolerates status lines without a reason phrase, which improves compatibility with some HTTP servers. [nnposter] @@ -289,13 +316,18 @@ o [NSE][GH#1169][GH#1170][GH#1171]][GH#1198] Parser for HTTP Set-Cookie header - attributes named "name" or "value" are ignored [nnposter] -o [NSE][GH#1158] Fix parsing http-grep.match script-arg. [Hans van den Bogert] +o [NSE][GH#1158] Fix parsing http-grep.match script-arg. [Hans van den + Bogert] -o [Zenmap][GH#1177] Avoid a crash when recent_scans.txt cannot be written to. - [Daniel Miller] +o [Zenmap][GH#1177] Avoid a crash when recent_scans.txt cannot be written + to. [Daniel Miller] -o Fixed --resume when the path to Nmap contains spaces. Reported on Windows by - Adriel Desautels. [Daniel Miller] +o Fixed --resume when the path to Nmap contains spaces. Reported on Windows + by Adriel Desautels. [Daniel Miller] + +o New service probe and match lines for adb, the Android Debug Bridge, which + allows remote code execution and is left enabled by default on many + devices. [Daniel Miller] Nmap 7.70 [2018-03-20] diff --git a/docs/nmap.usage.txt b/docs/nmap.usage.txt index 67c28520e..faefb7a24 100644 --- a/docs/nmap.usage.txt +++ b/docs/nmap.usage.txt @@ -1,4 +1,4 @@ -Nmap 7.70SVN ( https://nmap.org ) +Nmap 7.80 ( https://nmap.org ) Usage: nmap [Scan Type(s)] [Options] {target specification} TARGET SPECIFICATION: Can pass hostnames, IP addresses, networks, etc. diff --git a/mswin32/Makefile b/mswin32/Makefile index 690a58f14..5c090e52f 100644 --- a/mswin32/Makefile +++ b/mswin32/Makefile @@ -1,4 +1,4 @@ -MAKENSIS="/cygdrive/c/Program Files/NSIS/makensis.exe" +MAKENSIS="/cygdrive/c/Program Files (x86)/NSIS/makensis.exe" # VCExpress.exe is devenv.com with the commercial Visual Studio suite instead of VC++ Express 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') 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' export NPCAP_VERSION := $(shell ls npcap-*.exe | sed -e 's/npcap-\([-r0-9.]*\)\.exe/\1/' -e 'q') COMMA_VERSION=$(shell echo $(NMAP_NUM_VERSION) | tr '.' ',') LOGLOC=c:nmapbuild.log -NSE_FILES = scripts/script.db scripts/*.nse +NSE_FILES = ../scripts/script.db ../scripts/*.nse NMAP_MSWIN32_AUX = ../../nmap-mswin32-aux SIGNTOOL_ARGS = sign /a /n "Insecure.Com LLC" /tr http://timestamp.digicert.com /td sha256 /fd sha256 # escape quotes for NSIS # escape for right side of sed regex replace SIGNTOOL_SUBST = $(shell echo '"$(SIGNTOOL)" $(SIGNTOOL_ARGS)' | sed -e 's/"/$$\\"/g' -e 's/[\/&]/\\&/g' ) +PRODUCT_NAME=Nmap +PLATFORM=Win32 +BASE_CONFIG=Release +VCCONFIG=$(BASE_CONFIG) +NSIS_DEFINES= +ifdef NMAP_OEM +PRODUCT_NAME=Nmap OEM +OEM_SUFFIX=-oem +VCCONFIG=$(BASE_CONFIG)OEM +NSIS_DEFINES="/DNMAP_OEM=1" +endif + bundle-nmap: bundle-zip bundle-nsis build-nmap: nmap.sln nmap.rc - "$(VCEXPRESS)" nmap.sln /build release /out $(LOGLOC) + "$(VCEXPRESS)" nmap.sln /build "$(VCCONFIG)|$(PLATFORM)" /out $(LOGLOC) #"$(VCEXPRESS)" nmap.sln /build release /project nmap-update /out $(LOGLOC) stage-nmap: build-nmap LICENSE rm -rf nmap-$(NMAP_VERSION) mkdir nmap-$(NMAP_VERSION) - 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)/ + 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)/ # Use "cmd /c copy" rather than "cp" to preserve Windows ACLs. Using # "cp" means that the copied DLLs don't have the same ACL and cause an # error on startup: 0xc0000022. cmd /c copy $(subst /,\\,$(NMAP_MSWIN32_AUX))\\OpenSSL\\bin\\*.dll nmap-$(NMAP_VERSION) - cmd /c copy Release\\libssh2.dll Release\\zlibwapi.dll nmap-$(NMAP_VERSION) + cmd /c copy ..\\libssh2\\win32\\$(BASE_CONFIG)_dll\\libssh2.dll nmap-$(NMAP_VERSION) + cmd /c copy ..\\libz\\contrib\\vstudio\\vc12\\x86\\ZlibDll$(BASE_CONFIG)\\zlibwapi.dll nmap-$(NMAP_VERSION) mkdir nmap-$(NMAP_VERSION)/scripts - cd Release && cp -f $(NSE_FILES) ../nmap-$(NMAP_VERSION)/scripts/ - cd Release && for f in `find nselib -name .svn -prune -o -type d -print`; do \ - mkdir -p ../nmap-$(NMAP_VERSION)/$$f; \ + cp -f $(NSE_FILES) nmap-$(NMAP_VERSION)/scripts/ + for f in `cd .. && find nselib -name .svn -prune -o -type d -print`; do \ + mkdir -p nmap-$(NMAP_VERSION)/$$f; \ done - cd Release && for f in `find nselib -name .svn -prune -o -type f -print`; do \ - cp -f $$f ../nmap-$(NMAP_VERSION)/$$f; \ + for f in `cd .. && find nselib -name .svn -prune -o -type f -print`; do \ + cp -f ../$$f nmap-$(NMAP_VERSION)/$$f; \ done - cd Release && cp -r ../../docs/licenses ../nmap-$(NMAP_VERSION)/ + cp -r ../docs/licenses nmap-$(NMAP_VERSION)/ rm -rf nmap-$(NMAP_VERSION)/licenses/.svn - cp npcap-$(NPCAP_VERSION).exe nmap-$(NMAP_VERSION) + # TODO: change "-oem" to "$(OEM_SUFFIX)" when Npcap OEM is no longer needed for standard Nmap. + cp npcap-$(NPCAP_VERSION)-oem.exe nmap-$(NMAP_VERSION) cp $(NMAP_MSWIN32_AUX)/vcredist_x86.exe nmap-$(NMAP_VERSION) cp $(NMAP_MSWIN32_AUX)/vcredist2008_x86.exe nmap-$(NMAP_VERSION) - cp ../ncat/Release/ncat.exe nmap-$(NMAP_VERSION) - cp ../ncat/Release/ca-bundle.crt nmap-$(NMAP_VERSION) - cp ../nping/Release/nping.exe nmap-$(NMAP_VERSION) + cp ../ncat/$(BASE_CONFIG)/ncat.exe nmap-$(NMAP_VERSION) + cp ../ncat/$(BASE_CONFIG)/ca-bundle.crt nmap-$(NMAP_VERSION) + cp ../nping/$(BASE_CONFIG)/nping.exe nmap-$(NMAP_VERSION) #cp ../nmap-update/Release/nmap-update.exe nmap-$(NMAP_VERSION) # Install the ndiff batch file wrapper in the zip distribution. 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 bundle-nsis: nsis/Nmap.nsi sign-files cp nsis/AddToPath.nsh nsis/Nmap.nsi nsis/shortcuts.ini nsis/final.ini nmap-$(NMAP_VERSION) - $(MAKENSIS) nmap-$(NMAP_VERSION)/Nmap.nsi - mv nmap-$(NMAP_VERSION)/NmapInstaller.exe nmap-$(NMAP_VERSION)-setup.exe - "$(SIGNTOOL)" $(SIGNTOOL_ARGS) nmap-$(NMAP_VERSION)-setup.exe + $(MAKENSIS) "/XOutFile nmap-$(NMAP_VERSION)$(OEM_SUFFIX)-setup.exe" $(NSIS_DEFINES) nmap-$(NMAP_VERSION)/Nmap.nsi + mv nmap-$(NMAP_VERSION)/nmap-$(NMAP_VERSION)$(OEM_SUFFIX)-setup.exe . + "$(SIGNTOOL)" $(SIGNTOOL_ARGS) nmap-$(NMAP_VERSION)$(OEM_SUFFIX)-setup.exe bundle-zip: sign-files - rm -f nmap-$(NMAP_VERSION)-win32.zip + rm -f nmap-$(NMAP_VERSION)$(OEM_SUFFIX)-win32.zip zip -x nmap-$(NMAP_VERSION)/ZENMAP_README nmap-$(NMAP_VERSION)/zenmap/\* \ nmap-$(NMAP_VERSION)/zenmap.exe nmap-$(NMAP_VERSION)/share/\* \ nmap-$(NMAP_VERSION)/python27.dll nmap-$(NMAP_VERSION)/py2exe/\* \ nmap-$(NMAP_VERSION)/COPYING_HIGWIDGETS nmap-$(NMAP_VERSION)/w9xpopen.exe \ + nmap-$(NMAP_VERSION)/vcredist2008_x86.exe \ nmap-$(NMAP_VERSION)/ndiff.exe nmap-$(NMAP_VERSION)/\*.ini \ nmap-$(NMAP_VERSION)/Uninstall.exe nmap-$(NMAP_VERSION)/\*.nsi \ nmap-$(NMAP_VERSION)/\*.nsh \ - -r nmap-$(NMAP_VERSION)-win32.zip nmap-$(NMAP_VERSION) + -r nmap-$(NMAP_VERSION)$(OEM_SUFFIX)-win32.zip nmap-$(NMAP_VERSION) nmap.rc: nmap.rc.in ../nmap.h sed -e '1i// Automatically generated from $<.' \ -e 's/@@FILEVERSION@@/"$(NMAP_VERSION)\\0"/' \ -e 's/@@COMMAVERSION@@/$(COMMA_VERSION)/' \ + -e 's/@@PRODUCT_NAME@@/$(PRODUCT_NAME)/' \ "$<" > "$@" nsis/Nmap.nsi: nsis/Nmap.nsi.in ../nmap.h @@ -89,6 +105,8 @@ nsis/Nmap.nsi: nsis/Nmap.nsi.in ../nmap.h -e 's/@@VERSION@@/"$(NMAP_VERSION)"/' \ -e 's/@@NPCAP_VERSION@@/$(NPCAP_VERSION)/' \ -e 's/@@SIGNTOOL@@/$(SIGNTOOL_SUBST)/' \ + -e 's/@@OEM_SUFFIX@@/$(OEM_SUFFIX)/' \ + -e 's/@@PRODUCT_NAME@@/$(PRODUCT_NAME)/' \ "$<" > "$@" LICENSE: ../COPYING @@ -96,4 +114,4 @@ LICENSE: ../COPYING clean: "$(VCEXPRESS)" nmap.sln /clean - rm -rf Debug Release nmapbuild.log nmap.rc nsis/Nmap.nsi LICENSE + rm -rf Debug Release ReleaseOEM nmapbuild.log nmap.rc nsis/Nmap.nsi LICENSE diff --git a/mswin32/nmap.rc b/mswin32/nmap.rc deleted file mode 100644 index 615154a9b..000000000 --- a/mswin32/nmap.rc +++ /dev/null @@ -1,54 +0,0 @@ -// Automatically generated from nmap.rc.in. - //Microsoft Developer Studio generated resource script. -// -// edited -// - -#include -#include "resource.h" - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO -FILEVERSION 7,0,70,100 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x21L -#else - FILEFLAGS 0x20L -#endif - FILEOS 0x40004L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", "Insecure.Org\0" - VALUE "FileDescription", "Nmap\0" - VALUE "FileVersion", "7.70SVN\0" - VALUE "InternalName", "Nmap\0" - VALUE "LegalCopyright", "Copyright (c) Insecure.Com LLC (fyodor@insecure.org)\0" - VALUE "LegalTrademarks", "NMAP\0" - VALUE "OriginalFilename", "nmap.exe\0" - VALUE "ProductName", "Nmap\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_NMAP ICON DISCARDABLE "icon1.ico" diff --git a/mswin32/nmap.rc.in b/mswin32/nmap.rc.in index e56bfc32a..cea4e0348 100644 --- a/mswin32/nmap.rc.in +++ b/mswin32/nmap.rc.in @@ -28,13 +28,13 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Insecure.Org\0" - VALUE "FileDescription", "Nmap\0" + VALUE "FileDescription", "@@PRODUCT_NAME@@\0" VALUE "FileVersion", @@FILEVERSION@@ - VALUE "InternalName", "Nmap\0" + VALUE "InternalName", "@@PRODUCT_NAME@@\0" VALUE "LegalCopyright", "Copyright (c) Insecure.Com LLC (fyodor@insecure.org)\0" VALUE "LegalTrademarks", "NMAP\0" VALUE "OriginalFilename", "nmap.exe\0" - VALUE "ProductName", "Nmap\0" + VALUE "ProductName", "@@PRODUCT_NAME@@\0" END END BLOCK "VarFileInfo" diff --git a/mswin32/nmap.sln b/mswin32/nmap.sln index fc91192c2..986d5abe3 100644 --- a/mswin32/nmap.sln +++ b/mswin32/nmap.sln @@ -43,6 +43,8 @@ Global Ncat Static|x64 = Ncat Static|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 + ReleaseOEM|Win32 = ReleaseOEM|Win32 + ReleaseOEM|x64 = ReleaseOEM|x64 ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 EndGlobalSection @@ -55,6 +57,9 @@ Global {361719F0-AB42-4C93-9DE8-7D2144B96625}.Release|Win32.ActiveCfg = Release|Win32 {361719F0-AB42-4C93-9DE8-7D2144B96625}.Release|Win32.Build.0 = Release|Win32 {361719F0-AB42-4C93-9DE8-7D2144B96625}.Release|x64.ActiveCfg = Release|Win32 + {361719F0-AB42-4C93-9DE8-7D2144B96625}.ReleaseOEM|Win32.ActiveCfg = ReleaseOEM|Win32 + {361719F0-AB42-4C93-9DE8-7D2144B96625}.ReleaseOEM|Win32.Build.0 = ReleaseOEM|Win32 + {361719F0-AB42-4C93-9DE8-7D2144B96625}.ReleaseOEM|x64.ActiveCfg = ReleaseOEM|Win32 {361719F0-AB42-4C93-9DE8-7D2144B96625}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 {361719F0-AB42-4C93-9DE8-7D2144B96625}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 {361719F0-AB42-4C93-9DE8-7D2144B96625}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 @@ -67,6 +72,9 @@ Global {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Release|Win32.ActiveCfg = Release|Win32 {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Release|Win32.Build.0 = Release|Win32 {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Release|x64.ActiveCfg = Release|Win32 + {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.ReleaseOEM|Win32.ActiveCfg = Release|Win32 + {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.ReleaseOEM|Win32.Build.0 = Release|Win32 + {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.ReleaseOEM|x64.ActiveCfg = ReleaseNoPcap|Win32 {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseNoPcap|Win32 {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseNoPcap|Win32 {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseNoPcap|Win32 @@ -78,6 +86,9 @@ Global {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.Release|Win32.ActiveCfg = Release|Win32 {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.Release|Win32.Build.0 = Release|Win32 {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.Release|x64.ActiveCfg = Release|Win32 + {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.ReleaseOEM|Win32.ActiveCfg = Release|Win32 + {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.ReleaseOEM|Win32.Build.0 = Release|Win32 + {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.ReleaseOEM|x64.ActiveCfg = Release|Win32 {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 @@ -90,6 +101,9 @@ Global {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Release|Win32.ActiveCfg = Release|Win32 {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Release|Win32.Build.0 = Release|Win32 {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Release|x64.ActiveCfg = Release|Win32 + {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.ReleaseOEM|Win32.ActiveCfg = Release|Win32 + {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.ReleaseOEM|Win32.Build.0 = Release|Win32 + {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.ReleaseOEM|x64.ActiveCfg = Release|Win32 {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 @@ -101,6 +115,9 @@ Global {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Release|Win32.ActiveCfg = Release|Win32 {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Release|Win32.Build.0 = Release|Win32 {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Release|x64.ActiveCfg = Release|Win32 + {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.ReleaseOEM|Win32.ActiveCfg = Release|Win32 + {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.ReleaseOEM|Win32.Build.0 = Release|Win32 + {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.ReleaseOEM|x64.ActiveCfg = Release|Win32 {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 @@ -112,6 +129,9 @@ Global {31FB0767-A71F-4575-8379-002D72B8AF86}.Release|Win32.ActiveCfg = Release|Win32 {31FB0767-A71F-4575-8379-002D72B8AF86}.Release|Win32.Build.0 = Release|Win32 {31FB0767-A71F-4575-8379-002D72B8AF86}.Release|x64.ActiveCfg = Release|Win32 + {31FB0767-A71F-4575-8379-002D72B8AF86}.ReleaseOEM|Win32.ActiveCfg = Release|Win32 + {31FB0767-A71F-4575-8379-002D72B8AF86}.ReleaseOEM|Win32.Build.0 = Release|Win32 + {31FB0767-A71F-4575-8379-002D72B8AF86}.ReleaseOEM|x64.ActiveCfg = Release|Win32 {31FB0767-A71F-4575-8379-002D72B8AF86}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 {31FB0767-A71F-4575-8379-002D72B8AF86}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 {31FB0767-A71F-4575-8379-002D72B8AF86}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 @@ -124,6 +144,9 @@ Global {C1E04411-E021-468B-83F1-CB624BBA7589}.Release|Win32.ActiveCfg = Release|Win32 {C1E04411-E021-468B-83F1-CB624BBA7589}.Release|Win32.Build.0 = Release|Win32 {C1E04411-E021-468B-83F1-CB624BBA7589}.Release|x64.ActiveCfg = Release|Win32 + {C1E04411-E021-468B-83F1-CB624BBA7589}.ReleaseOEM|Win32.ActiveCfg = Release|Win32 + {C1E04411-E021-468B-83F1-CB624BBA7589}.ReleaseOEM|Win32.Build.0 = Release|Win32 + {C1E04411-E021-468B-83F1-CB624BBA7589}.ReleaseOEM|x64.ActiveCfg = Release|Win32 {C1E04411-E021-468B-83F1-CB624BBA7589}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 {C1E04411-E021-468B-83F1-CB624BBA7589}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 {C1E04411-E021-468B-83F1-CB624BBA7589}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 @@ -135,6 +158,9 @@ Global {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Release|Win32.ActiveCfg = Release|Win32 {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Release|Win32.Build.0 = Release|Win32 {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Release|x64.ActiveCfg = Release|Win32 + {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.ReleaseOEM|Win32.ActiveCfg = Release|Win32 + {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.ReleaseOEM|Win32.Build.0 = Release|Win32 + {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.ReleaseOEM|x64.ActiveCfg = Release|Win32 {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 @@ -146,6 +172,9 @@ Global {99157C3F-39F6-4663-99D7-1D9C1484494E}.Release|Win32.ActiveCfg = Release|Win32 {99157C3F-39F6-4663-99D7-1D9C1484494E}.Release|Win32.Build.0 = Release|Win32 {99157C3F-39F6-4663-99D7-1D9C1484494E}.Release|x64.ActiveCfg = Release|Win32 + {99157C3F-39F6-4663-99D7-1D9C1484494E}.ReleaseOEM|Win32.ActiveCfg = Release|Win32 + {99157C3F-39F6-4663-99D7-1D9C1484494E}.ReleaseOEM|Win32.Build.0 = Release|Win32 + {99157C3F-39F6-4663-99D7-1D9C1484494E}.ReleaseOEM|x64.ActiveCfg = Release|Win32 {99157C3F-39F6-4663-99D7-1D9C1484494E}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 {99157C3F-39F6-4663-99D7-1D9C1484494E}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 {99157C3F-39F6-4663-99D7-1D9C1484494E}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 @@ -158,6 +187,9 @@ Global {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Release|Win32.ActiveCfg = Release|Win32 {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Release|Win32.Build.0 = Release|Win32 {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Release|x64.ActiveCfg = Release|Win32 + {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.ReleaseOEM|Win32.ActiveCfg = Release|Win32 + {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.ReleaseOEM|Win32.Build.0 = Release|Win32 + {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.ReleaseOEM|x64.ActiveCfg = Release|Win32 {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 @@ -169,6 +201,8 @@ Global {BBF27339-C7B6-4F52-B742-897796C1F13B}.Ncat Static|x64.ActiveCfg = Release|Win32 {BBF27339-C7B6-4F52-B742-897796C1F13B}.Release|Win32.ActiveCfg = Release|Win32 {BBF27339-C7B6-4F52-B742-897796C1F13B}.Release|x64.ActiveCfg = Release|Win32 + {BBF27339-C7B6-4F52-B742-897796C1F13B}.ReleaseOEM|Win32.ActiveCfg = Release|Win32 + {BBF27339-C7B6-4F52-B742-897796C1F13B}.ReleaseOEM|x64.ActiveCfg = Release|Win32 {BBF27339-C7B6-4F52-B742-897796C1F13B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 {BBF27339-C7B6-4F52-B742-897796C1F13B}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 {BBF27339-C7B6-4F52-B742-897796C1F13B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 @@ -184,6 +218,10 @@ Global {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseOEM|Win32.ActiveCfg = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseOEM|Win32.Build.0 = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseOEM|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseOEM|x64.Build.0 = ReleaseWithoutAsm|x64 {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 @@ -197,6 +235,9 @@ Global {ED957342-E43B-496E-92D9-4C76B525BDF5}.Release|Win32.ActiveCfg = Release|Win32 {ED957342-E43B-496E-92D9-4C76B525BDF5}.Release|Win32.Build.0 = Release|Win32 {ED957342-E43B-496E-92D9-4C76B525BDF5}.Release|x64.ActiveCfg = Release|Win32 + {ED957342-E43B-496E-92D9-4C76B525BDF5}.ReleaseOEM|Win32.ActiveCfg = Release|Win32 + {ED957342-E43B-496E-92D9-4C76B525BDF5}.ReleaseOEM|Win32.Build.0 = Release|Win32 + {ED957342-E43B-496E-92D9-4C76B525BDF5}.ReleaseOEM|x64.ActiveCfg = Release|Win32 {ED957342-E43B-496E-92D9-4C76B525BDF5}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 {ED957342-E43B-496E-92D9-4C76B525BDF5}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 {ED957342-E43B-496E-92D9-4C76B525BDF5}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 @@ -211,6 +252,9 @@ Global {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseOEM|Win32.ActiveCfg = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseOEM|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseOEM|x64.Build.0 = ReleaseWithoutAsm|x64 {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 diff --git a/mswin32/nmap.vcxproj b/mswin32/nmap.vcxproj index e7bd3788d..3d6a173f6 100644 --- a/mswin32/nmap.vcxproj +++ b/mswin32/nmap.vcxproj @@ -5,6 +5,10 @@ Debug Win32 + + ReleaseOEM + Win32 + Release Win32 @@ -21,6 +25,12 @@ MultiByte v120 + + Application + false + MultiByte + v120 + Application false @@ -34,6 +44,10 @@ + + + + @@ -41,10 +55,12 @@ <_ProjectFileVersion>10.0.30319.1 - .\$(Configuration)\ + .\$(Configuration)\ + @@ -88,17 +104,13 @@ MachineX86 - - xcopy "$(SolutionDir)..\scripts" ".\$(Configuration)\scripts\" /e /y && xcopy "$(SolutionDir)..\nselib\*.lua" "$(SolutionDir)\$(Configuration)\nselib\" /y && xcopy /s /e "$(SolutionDir)..\nselib\data\*.*" "$(SolutionDir)\$(Configuration)\nselib\data\" /y && xcopy "$(SolutionDir)\..\..\nmap-mswin32-aux\OpenSSL\bin\*.dll" "$(SolutionDir)\$(Configuration)\" /y && xcopy "$(SolutionDir)..\nse_main.lua" "$(SolutionDir)\$(Configuration)\" /y -xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(ProjectDir)$(OutDir)" - $(IntDir)%(Filename).res - .\Release/nmap.tlb + .\$(Configuration)/nmap.tlb @@ -111,32 +123,64 @@ xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(Proje true - .\Release/nmap.pch - .\Release/ - .\Release/ - .\Release/ + .\$(Configuration)/nmap.pch + .\$(Configuration)/ + .\$(Configuration)/ + .\$(Configuration)/ true CompileAsCpp liblua.lib;nsock.lib;libpcre.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlibwapi.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libeay32.lib;ssleay32.lib;shell32.lib;libnetutil.lib - .\Release/nmap.exe + .\$(Configuration)/nmap.exe true ..\libssh2\win32\Release_dll;..\..\nmap-mswin32-aux\Npcap\Lib;..\liblua;..\libpcre;..\nsock;..\nbase;..\libdnet-stripped;../libnetutil;..\..\nmap-mswin32-aux\OpenSSL\lib;..\liblinear;..\libz\contrib\vstudio\vc12\x86\ZlibDllRelease;%(AdditionalLibraryDirectories) %(IgnoreSpecificDefaultLibraries) packet.dll;wpcap.dll;iphlpapi.dll;%(DelayLoadDLLs) - .\Release/nmap.pdb + .\$(Configuration)/nmap.pdb + Console + true + true + MachineX86 + /LTCG %(AdditionalOptions) + + + + + .\$(Configuration)/nmap.tlb + + + + + MaxSpeed + OnlyExplicitInline + .;..;..\liblua;..\nbase;..\libpcre;..\nsock\include;..\..\nmap-mswin32-aux\Npcap\Include;..\libdnet-stripped\include;..\..\nmap-mswin32-aux\OpenSSL\include;..\liblinear;..\libssh2\include;..\libz;%(AdditionalIncludeDirectories) + NMAP_OEM;WIN32;_CONSOLE;BPF_MAJOR_VERSION;ZLIB_WINAPI;%(PreprocessorDefinitions) + true + true + + + .\$(Configuration)/nmap.pch + .\$(Configuration)/ + .\$(Configuration)/ + .\$(Configuration)/ + true + CompileAsCpp + + + liblua.lib;nsock.lib;libpcre.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlibwapi.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libeay32.lib;ssleay32.lib;shell32.lib;libnetutil.lib + .\$(Configuration)/nmap.exe + true + ..\libssh2\win32\Release_dll;..\..\nmap-mswin32-aux\Npcap\Lib;..\liblua;..\libpcre;..\nsock;..\nbase;..\libdnet-stripped;../libnetutil;..\..\nmap-mswin32-aux\OpenSSL\lib;..\liblinear;..\libz\contrib\vstudio\vc12\x86\ZlibDllRelease;%(AdditionalLibraryDirectories) + %(IgnoreSpecificDefaultLibraries) + packet.dll;wpcap.dll;iphlpapi.dll;%(DelayLoadDLLs) + .\$(Configuration)/nmap.pdb Console true true MachineX86 /LTCG %(AdditionalOptions) - - xcopy "$(SolutionDir)..\scripts" ".\$(Configuration)\scripts\" /e /y && xcopy "$(SolutionDir)..\nselib\*.lua" "$(SolutionDir)\$(Configuration)\nselib\" /y && xcopy /s /e "$(SolutionDir)..\nselib\data\*.*" "$(SolutionDir)\$(Configuration)\nselib\data\" /y && xcopy "$(SolutionDir)\..\..\nmap-mswin32-aux\OpenSSL\bin\*.dll" "$(SolutionDir)\$(Configuration)\" /y && xcopy "$(SolutionDir)..\nse_main.lua" "$(SolutionDir)\$(Configuration)\" /y -xcopy /y /d "$(ProjectDir)..\libz\contrib\vstudio\vc12\x86\ZlibDll$(Configuration)\*.dll" "$(ProjectDir)$(OutDir)" -xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(ProjectDir)$(OutDir)" - @@ -191,6 +235,7 @@ xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(Proje Sync Sync + Sync @@ -254,9 +299,13 @@ xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(Proje $(TargetDir)%(Filename);%(Outputs) Copying %(Filename) to output directory... + Copying %(Filename) to output directory... copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul $(TargetDir)%(Filename);%(Outputs) + $(TargetDir)%(Filename);%(Outputs) Copying %(Filename) to output directory... @@ -264,9 +313,13 @@ xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(Proje $(TargetDir)%(Filename);%(Outputs) Copying %(Filename) to output directory... + Copying %(Filename) to output directory... copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul $(TargetDir)%(Filename);%(Outputs) + $(TargetDir)%(Filename);%(Outputs) Copying %(Filename) to output directory... @@ -274,9 +327,13 @@ xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(Proje $(TargetDir)%(Filename);%(Outputs) Copying %(Filename) to output directory... + Copying %(Filename) to output directory... copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul $(TargetDir)%(Filename);%(Outputs) + $(TargetDir)%(Filename);%(Outputs) Copying %(Filename) to output directory... @@ -284,9 +341,13 @@ xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(Proje $(TargetDir)%(Filename);%(Outputs) Copying %(Filename) to output directory... + Copying %(Filename) to output directory... copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul $(TargetDir)%(Filename);%(Outputs) + $(TargetDir)%(Filename);%(Outputs) Copying %(Filename) to output directory... @@ -294,9 +355,13 @@ xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(Proje $(TargetDir)%(Filename);%(Outputs) Copying %(Filename) to output directory... + Copying %(Filename) to output directory... copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul $(TargetDir)%(Filename);%(Outputs) + $(TargetDir)%(Filename);%(Outputs) Copying %(Filename) to output directory... @@ -304,9 +369,13 @@ xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(Proje $(TargetDir)%(Filename);%(Outputs) Copying %(Filename) to output directory... + Copying %(Filename) to output directory... copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul $(TargetDir)%(Filename);%(Outputs) + $(TargetDir)%(Filename);%(Outputs) Copying %(Filename) to output directory... @@ -314,9 +383,13 @@ xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(Proje $(TargetDir)%(Filename);%(Outputs) Copying %(Filename) to output directory... + Copying %(Filename) to output directory... copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul $(TargetDir)%(Filename);%(Outputs) + $(TargetDir)%(Filename);%(Outputs) Copying %(Filename).xsl to output directory... @@ -324,9 +397,13 @@ xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(Proje $(TargetDir)%(Filename).xsl;%(Outputs) Copying %(Filename).xsl to output directory... + Copying %(Filename).xsl to output directory... copy /y "%(FullPath)" "$(TargetDir)%(Filename).xsl" > nul + + copy /y "%(FullPath)" "$(TargetDir)%(Filename).xsl" > nul $(TargetDir)%(Filename).xsl;%(Outputs) + $(TargetDir)%(Filename).xsl;%(Outputs) @@ -362,4 +439,4 @@ xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(Proje - \ No newline at end of file + diff --git a/mswin32/nsis/Nmap.nsi.in b/mswin32/nsis/Nmap.nsi.in index 3d7e89dbc..90ff52b36 100644 --- a/mswin32/nsis/Nmap.nsi.in +++ b/mswin32/nsis/Nmap.nsi.in @@ -39,9 +39,10 @@ ;-------------------------------- ;General - +!define NMAP_NAME "@@PRODUCT_NAME@@" +!define FILE_SUFFIX "@@OEM_SUFFIX@@" ;Name and file - Name "Nmap" + Name "${NMAP_NAME}" ;-------------------------------- ; Sign the uninstaller @@ -77,7 +78,6 @@ ; Good. Now we can carry on writing the real installer. - OutFile "NmapInstaller.exe" SetCompressor /SOLID /FINAL lzma ;Required for removing shortcuts @@ -85,21 +85,21 @@ !endif ;Default installation folder - InstallDir "$PROGRAMFILES\Nmap" + InstallDir "$PROGRAMFILES\${NMAP_NAME}" ;Get installation folder from registry if available - InstallDirRegKey HKCU "Software\Nmap" "" + InstallDirRegKey HKCU "Software\${NMAP_NAME}" "" !define VERSION @@VERSION@@ !define STAGE_DIR ..\nmap-${VERSION} VIProductVersion @@VIPRODUCTVERSION@@ VIAddVersionKey /LANG=1033 "FileVersion" "${VERSION}" - VIAddVersionKey /LANG=1033 "ProductName" "Nmap" + VIAddVersionKey /LANG=1033 "ProductName" "${NMAP_NAME}" VIAddVersionKey /LANG=1033 "CompanyName" "Insecure.org" VIAddVersionKey /LANG=1033 "InternalName" "NmapInstaller.exe" VIAddVersionKey /LANG=1033 "LegalCopyright" "Copyright (c) Insecure.Com LLC (fyodor@insecure.org)" VIAddVersionKey /LANG=1033 "LegalTrademark" "NMAP" - VIAddVersionKey /LANG=1033 "FileDescription" "Nmap installer" + VIAddVersionKey /LANG=1033 "FileDescription" "${NMAP_NAME} installer" ;-------------------------------- ;Interface Settings @@ -163,14 +163,14 @@ Function makeShortcuts ReadINIStr $0 "$PLUGINSDIR\shortcuts.ini" "Field 1" "State" StrCmp $0 "0" skipdesktop - CreateShortCut "$DESKTOP\Nmap - Zenmap GUI.lnk" "$INSTDIR\zenmap.exe" + CreateShortCut "$DESKTOP\${NMAP_NAME} - Zenmap GUI.lnk" "$INSTDIR\zenmap.exe" skipdesktop: ReadINIStr $0 "$PLUGINSDIR\shortcuts.ini" "Field 2" "State" StrCmp $0 "0" skipstartmenu - CreateDirectory "$SMPROGRAMS\Nmap" - CreateShortCut "$SMPROGRAMS\Nmap\Nmap - Zenmap GUI.lnk" "$INSTDIR\zenmap.exe" + CreateDirectory "$SMPROGRAMS\${NMAP_NAME}" + CreateShortCut "$SMPROGRAMS\${NMAP_NAME}\${NMAP_NAME} - Zenmap GUI.lnk" "$INSTDIR\zenmap.exe" skipstartmenu: @@ -179,7 +179,7 @@ FunctionEnd Function finalPage ; diplay a page saying everything's finished - !insertmacro MUI_HEADER_TEXT "Finished" "Thank you for installing Nmap" + !insertmacro MUI_HEADER_TEXT "Finished" "Thank you for installing ${NMAP_NAME}" !insertmacro MUI_INSTALLOPTIONS_DISPLAY "final.ini" FunctionEnd @@ -209,7 +209,7 @@ Section "Nmap Core Files" SecCore StrCpy $R0 $INSTDIR "" -13 StrCmp $R0 "\My Documents" bad_key_install probably_safe_key_install bad_key_install: - MessageBox MB_YESNO "It may not be safe to uninstall the previous installation of Nmap from the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)?" IDYES probably_safe_key_install + MessageBox MB_YESNO "It may not be safe to uninstall the previous installation of ${NMAP_NAME} from the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)?" IDYES probably_safe_key_install Abort "Install aborted by user" probably_safe_key_install: @@ -243,6 +243,7 @@ Section "Nmap Core Files" SecCore File ${STAGE_DIR}\3rd-party-licenses.txt File /r /x .svn ${STAGE_DIR}\licenses File libssh2.dll + File zlibwapi.dll File libeay32.dll File ssleay32.dll File /r /x mswin32 /x .svn /x ncat ${STAGE_DIR}\scripts @@ -250,7 +251,7 @@ Section "Nmap Core Files" SecCore File ..\icon1.ico ;Store installation folder - WriteRegStr HKCU "Software\Nmap" "" $INSTDIR + WriteRegStr HKCU "Software\${NMAP_NAME}" "" $INSTDIR Call vcredist2013installer Call create_uninstaller @@ -268,9 +269,15 @@ Section "Npcap @@NPCAP_VERSION@@" SecNpcap !else SetOutPath "$PLUGINSDIR" SetOverwrite on - File "..\npcap-@@NPCAP_VERSION@@.exe" - ExecWait '"$PLUGINSDIR\npcap-@@NPCAP_VERSION@@.exe" /winpcap_mode=no' - Delete "$PLUGINSDIR\npcap-@@NPCAP_VERSION@@.exe" + File "..\npcap-@@NPCAP_VERSION@@-oem.exe" + IfSilent npcap_silent npcap_loud + npcap_silent: + ExecWait '"$PLUGINSDIR\npcap-@@NPCAP_VERSION@@-oem.exe" /S /winpcap_mode=no' + Goto delete_npcap + npcap_loud: + ExecWait '"$PLUGINSDIR\npcap-@@NPCAP_VERSION@@-oem.exe" /winpcap_mode=no' + delete_npcap: + Delete "$PLUGINSDIR\npcap-@@NPCAP_VERSION@@-oem.exe" !endif SectionEnd @@ -326,14 +333,14 @@ Section "Nping (Packet generator)" SecNping Call create_uninstaller SectionEnd -Section "nmap-update (updater for architecture-independent files)" SecNmapUpdate - SetOutPath "$INSTDIR" - SetOverwrite on - File ${STAGE_DIR}\nmap-update.exe - Call vcredist2013installer - Call create_uninstaller -SectionEnd - +#Section "nmap-update (updater for architecture-independent files)" SecNmapUpdate +# SetOutPath "$INSTDIR" +# SetOverwrite on +# File ${STAGE_DIR}\nmap-update.exe +# Call vcredist2013installer +# Call create_uninstaller +#SectionEnd +# Function vcredist2013installer StrCmp $vcredist2013set "" 0 vcredist_done StrCpy $vcredist2013set "true" @@ -408,15 +415,15 @@ FunctionEnd Function create_uninstaller StrCmp $addremoveset "" 0 skipaddremove ; Register Nmap with add/remove programs - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Nmap" "DisplayName" "Nmap ${VERSION}" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Nmap" "DisplayVersion" "${VERSION}" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Nmap" "Publisher" "Nmap Project" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Nmap" "URLInfoAbout" "https://nmap.org/" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Nmap" "URLUpdateInfo" "https://nmap.org/download.html" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Nmap" "UninstallString" '"$INSTDIR\uninstall.exe"' - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Nmap" "DisplayIcon" '"$INSTDIR\icon1.ico"' - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Nmap" "NoModify" 1 - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Nmap" "NoRepair" 1 + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NMAP_NAME}" "DisplayName" "${NMAP_NAME} ${VERSION}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NMAP_NAME}" "DisplayVersion" "${VERSION}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NMAP_NAME}" "Publisher" "Nmap Project" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NMAP_NAME}" "URLInfoAbout" "https://nmap.org/" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NMAP_NAME}" "URLUpdateInfo" "https://nmap.org/download.html" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NMAP_NAME}" "UninstallString" '"$INSTDIR\uninstall.exe"' + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NMAP_NAME}" "DisplayIcon" '"$INSTDIR\icon1.ico"' + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NMAP_NAME}" "NoModify" 1 + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NMAP_NAME}" "NoRepair" 1 ;Create uninstaller !ifndef INNER SetOutPath $INSTDIR @@ -453,7 +460,8 @@ Function .onInit !endif !ifndef NMAP_OEM - SetSilent normal + ; Future releases may limit silent install to OEM-licensed installer + ;SetSilent normal !endif !insertmacro MUI_INSTALLOPTIONS_EXTRACT "shortcuts.ini" @@ -470,7 +478,7 @@ Function .onInit !insertmacro OptionDisableSection $0 "/NCAT=" ${SecNcat} !insertmacro OptionDisableSection $0 "/NDIFF=" ${SecNdiff} !insertmacro OptionDisableSection $0 "/NPING=" ${SecNping} - !insertmacro OptionDisableSection $0 "/NMAPUPDATE=" ${SecNmapUpdate} + #!insertmacro OptionDisableSection $0 "/NMAPUPDATE=" ${SecNmapUpdate} FunctionEnd ;-------------------------------- @@ -485,7 +493,7 @@ FunctionEnd LangString DESC_SecNcat ${LANG_ENGLISH} "Installs Ncat, Nmap's Netcat replacement." LangString DESC_SecNdiff ${LANG_ENGLISH} "Installs Ndiff, a tool for comparing Nmap XML files." LangString DESC_SecNping ${LANG_ENGLISH} "Installs Nping, a packet generation tool." - LangString DESC_SecNmapUpdate ${LANG_ENGLISH} "Installs nmap-update, an updater for architecture-independent files." + #LangString DESC_SecNmapUpdate ${LANG_ENGLISH} "Installs nmap-update, an updater for architecture-independent files." ;Assign language strings to sections !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN @@ -497,7 +505,7 @@ FunctionEnd !insertmacro MUI_DESCRIPTION_TEXT ${SecNcat} $(DESC_SecNcat) !insertmacro MUI_DESCRIPTION_TEXT ${SecNdiff} $(DESC_SecNdiff) !insertmacro MUI_DESCRIPTION_TEXT ${SecNping} $(DESC_SecNping) - !insertmacro MUI_DESCRIPTION_TEXT ${SecNmapUpdate} $(DESC_SecNmapUpdate) + #!insertmacro MUI_DESCRIPTION_TEXT ${SecNmapUpdate} $(DESC_SecNmapUpdate) !insertmacro MUI_FUNCTION_DESCRIPTION_END ;-------------------------------- ;Uninstaller Section @@ -522,7 +530,7 @@ Section "Uninstall" StrCpy $R0 $INSTDIR "" -13 StrCmp $R0 "\My Documents" bad_key_uninstall probably_safe_key_uninstall bad_key_uninstall: - MessageBox MB_YESNO "It may not be safe to uninstall Nmap from the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)?" IDYES probably_safe_key_uninstall + MessageBox MB_YESNO "It may not be safe to uninstall ${NMAP_NAME} from the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)?" IDYES probably_safe_key_uninstall Abort "Uninstall aborted by user" probably_safe_key_uninstall: @@ -531,8 +539,8 @@ Section "Uninstall" IfFileExists $INSTDIR\ncat.exe nmap_installed IfFileExists $INSTDIR\nping.exe nmap_installed IfFileExists $INSTDIR\ndiff.exe nmap_installed - IfFileExists $INSTDIR\nmap-update.exe nmap_installed - MessageBox MB_YESNO "It does not appear that Nmap is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)?" IDYES nmap_installed + #IfFileExists $INSTDIR\nmap-update.exe nmap_installed + MessageBox MB_YESNO "It does not appear that ${NMAP_NAME} is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)?" IDYES nmap_installed Abort "Uninstall aborted by user" SetDetailsPrint textonly @@ -557,6 +565,7 @@ Section "Uninstall" Delete "$INSTDIR\README-WIN32" Delete "$INSTDIR\icon1.ico" Delete "$INSTDIR\libssh2.dll" + Delete "$INSTDIR\zlibwapi.dll" Delete "$INSTDIR\libeay32.dll" Delete "$INSTDIR\ssleay32.dll" Delete "$INSTDIR\npcap-*.exe" @@ -568,7 +577,7 @@ Section "Uninstall" Delete "$INSTDIR\COPYING_HIGWIDGETS" Delete "$INSTDIR\ncat.exe" Delete "$INSTDIR\nping.exe" - Delete "$INSTDIR\nmap-update.exe" + #Delete "$INSTDIR\nmap-update.exe" Delete "$INSTDIR\ca-bundle.crt" ;Delete specific subfolders (NB: custom scripts in scripts folder will be lost) RMDir /r "$INSTDIR\nselib" @@ -585,16 +594,16 @@ Section "Uninstall" SetDetailsPrint textonly DetailPrint "Deleting Registry Keys..." SetDetailsPrint listonly - DeleteRegKey /ifempty HKCU "Software\Nmap" - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Nmap" + DeleteRegKey /ifempty HKCU "Software\${NMAP_NAME}" + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NMAP_NAME}" SetDetailsPrint textonly DetailPrint "Unregistering Nmap Path..." Push $INSTDIR Call un.RemoveFromPath - Delete "$DESKTOP\Nmap - Zenmap GUI.lnk" - Delete "$SMPROGRAMS\Nmap\Nmap - Zenmap GUI.lnk" - RMDIR "$SMPROGRAMS\Nmap" + Delete "$DESKTOP\${NMAP_NAME} - Zenmap GUI.lnk" + Delete "$SMPROGRAMS\${NMAP_NAME}\${NMAP_NAME} - Zenmap GUI.lnk" + RMDIR "$SMPROGRAMS\${NMAP_NAME}" SetDetailsPrint both SectionEnd diff --git a/ncat/docs/ncat.usage.txt b/ncat/docs/ncat.usage.txt index ea71324e1..2752f56b7 100644 --- a/ncat/docs/ncat.usage.txt +++ b/ncat/docs/ncat.usage.txt @@ -1,4 +1,4 @@ -Ncat 7.70SVN ( https://nmap.org/ncat ) +Ncat 7.80 ( https://nmap.org/ncat ) Usage: ncat [options] [hostname] [port] Options taking a time assume seconds. Append 'ms' for milliseconds, diff --git a/ncat/ncat.h b/ncat/ncat.h index c498dd996..b75fced75 100644 --- a/ncat/ncat.h +++ b/ncat/ncat.h @@ -152,7 +152,7 @@ /* Ncat information for output, etc. */ #define NCAT_NAME "Ncat" #define NCAT_URL "https://nmap.org/ncat" -#define NCAT_VERSION "7.70SVN" +#define NCAT_VERSION "7.80" #ifndef __GNUC__ #ifndef __attribute__ diff --git a/nmap.h b/nmap.h index ffe3b0c7b..fd9fdd959 100644 --- a/nmap.h +++ b/nmap.h @@ -195,13 +195,13 @@ #ifndef NMAP_VERSION /* Edit this definition only within the quotes, because it is read from this file by the makefiles. */ -#define NMAP_VERSION "7.70SVN" -#define NMAP_NUM_VERSION "7.0.70.100" +#define NMAP_VERSION "7.80" +#define NMAP_NUM_VERSION "7.0.80.0" #endif /* The version number of updates retrieved by the nmap-update program. It can be different (but should always be the same or earlier) than NMAP_VERSION. */ -#define NMAP_UPDATE_CHANNEL "7.70" +#define NMAP_UPDATE_CHANNEL "7.80" #define NMAP_XMLOUTPUTVERSION "1.04" diff --git a/nping/nping.h b/nping/nping.h index b17217349..1d2042812 100644 --- a/nping/nping.h +++ b/nping/nping.h @@ -342,7 +342,7 @@ /* General tunable defines **************************************************/ #define NPING_NAME "Nping" #define NPING_URL "https://nmap.org/nping" -#define NPING_VERSION "0.7.70SVN" +#define NPING_VERSION "0.7.80" #define DEFAULT_VERBOSITY VB_0 diff --git a/zenmap/share/zenmap/config/zenmap_version b/zenmap/share/zenmap/config/zenmap_version index e1fb92ca0..1d6f410ac 100644 --- a/zenmap/share/zenmap/config/zenmap_version +++ b/zenmap/share/zenmap/config/zenmap_version @@ -1 +1 @@ -7.70SVN +7.80 diff --git a/zenmap/zenmapCore/Version.py b/zenmap/zenmapCore/Version.py index 2b41a3af7..ac6dcda08 100644 --- a/zenmap/zenmapCore/Version.py +++ b/zenmap/zenmapCore/Version.py @@ -1 +1 @@ -VERSION = "7.70SVN" +VERSION = "7.80"