Nmap - the Network Mapper. Github mirror of official SVN repository. https://svn.nmap.org/
Find a file
david d6288c5280 Escape '%' in arguments to Thread:d.
A user reported this crash when scanning a target whose name contained
the '%' character:

NSE: Script Engine Scan Aborted.
An error was thrown by the engine: nse_main.lua:322: invalid capture index
stack traceback:
	[C]: in function 'gsub'
	nse_main.lua:322: in function 'd'
	nse_main.lua:377: in function 'start'
	nse_main.lua:912: in function 'run'
	nse_main.lua:1390: in function <nse_main.lua:1293>
	[C]: in ?

I'm not sure how a name with '%' got resolved, but I was able to
reproduce the crash by adding this line to /etc/hosts:
	127.0.0.1	a%40b
and then running
	./nmap --script=banner a%40b -d --top-ports 5

The gsub function recognizes "%d", where d is a digit, as a capture
index. The constructed string is then passed to print_debug, which is
like printf. Therefore we escape every occurrence of "%" twice, to get
"%%%%".
2014-01-27 22:56:29 +00:00
docs Remove trailing whitespace in lua files 2014-01-23 21:51:58 +00:00
libdnet-stripped Fix rt_msghdr padding on NetBSD. 2013-06-01 16:28:44 +00:00
liblinear Use the default value of MultiThreadedDLL where possible. 2013-02-09 20:30:01 +00:00
liblua Update bundled liblua from 5.2.2 to 5.2.3 2014-01-02 15:33:55 +00:00
libnetutil Fix assert fail on FreeBSD in libdnet 2013-11-07 19:32:33 +00:00
libpcap
libpcre Use the default value of MultiThreadedDLL where possible. 2013-02-09 20:30:01 +00:00
macosx Target Mac OS X 10.6 in the Mac bundles. 2013-11-12 04:59:07 +00:00
mswin32 Updated Nmap NSIS file to use WinPcap 4.1.3 installer. 2014-01-11 15:00:05 +00:00
nbase Re-autoconf the configure scripts (using 2.69) 2013-12-11 23:17:47 +00:00
ncat Re-autoconf the configure scripts (using 2.69) 2013-12-11 23:17:47 +00:00
ndiff Enforce PEP 8 style on Ndiff 2014-01-10 20:43:32 +00:00
nmap-update
nping Re-autoconf the configure scripts (using 2.69) 2013-12-11 23:17:47 +00:00
nselib Retab creds.lua (Fixes some nsedoc ugliness) 2014-01-23 21:52:38 +00:00
nsock Nsock: let libpcap decisions set LDFLAGS, needed for make check 2014-01-26 16:38:24 +00:00
scripts Fix some bugs in sstp-discover reported on IRC 2014-01-27 19:13:22 +00:00
todo A couple more todo items. Enough for now. 2013-12-23 17:54:26 +00:00
zenmap Define in-use-but-undefined ScriptDBSyntaxError 2014-01-21 22:17:16 +00:00
acinclude.m4
aclocal.m4
BSDmakefile
CHANGELOG Add CHANGELOG entry for tls library 2014-01-16 21:50:26 +00:00
charpool.cc Add a lacking space in the license comment. The command I used to do this is: 2013-09-11 19:06:20 +00:00
charpool.h Add a lacking space in the license comment. The command I used to do this is: 2013-09-11 19:06:20 +00:00
checklibs.sh checklibs.sh: newest didn't work when newest version was first in list 2013-12-24 19:23:33 +00:00
config.guess
config.sub
configure Improve support for non-included libpcap in nsock 2014-01-26 16:38:22 +00:00
configure.ac Improve support for non-included libpcap in nsock 2014-01-26 16:38:22 +00:00
COPYING Add a lacking space in the license comment. The command I used to do this is: 2013-09-11 19:06:20 +00:00
depcomp
FingerPrintResults.cc Add a lacking space in the license comment. The command I used to do this is: 2013-09-11 19:06:20 +00:00
FingerPrintResults.h Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
FPEngine.cc Revert r32528, was not tested on Windows 2013-11-27 13:32:05 +00:00
FPEngine.h Add a lacking space in the license comment. The command I used to do this is: 2013-09-11 19:06:20 +00:00
FPModel.cc IPv6 OS submissions from 20130614. 2013-07-16 00:51:47 +00:00
global_structures.h Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
HACKING Update some mailing list references. 2012-12-06 02:34:28 +00:00
idle_scan.cc Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
idle_scan.h Revert r32528, was not tested on Windows 2013-11-27 13:32:05 +00:00
INSTALL
ltmain.sh
MACLookup.cc Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
MACLookup.h Add a lacking space in the license comment. The command I used to do this is: 2013-09-11 19:06:20 +00:00
main.cc Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
Makefile.in Don't clean Ndiff if it wasn't built 2014-01-26 16:54:13 +00:00
missing
nmap-header-template.cc Add a lacking space in the license comment. The command I used to do this is: 2013-09-11 19:06:20 +00:00
nmap-mac-prefixes Update nmap-mac-prefixes with latest IEEE data 2013-11-21 19:51:21 +00:00
nmap-os-db Replace '# Fingerprint' with just '#' to make it more consistent. 2014-01-08 01:14:33 +00:00
nmap-payloads o [NSE] Add freelancer-info to gather information about the Freelancer 2013-11-20 04:31:31 +00:00
nmap-protocols Update nmap-protocols from IANA (5 additions) 2013-04-12 17:29:18 +00:00
nmap-rpc Update some more headers. 2012-12-06 02:25:46 +00:00
nmap-service-probes o Added version detection signatures and probes for a bunch of Android 2013-12-14 22:23:29 +00:00
nmap-services Add some ports/descriptions sent in by James Cole 2013-12-26 00:36:45 +00:00
nmap.cc Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
nmap.h Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
nmap.spec.in
nmap_amigaos.h Add a lacking space in the license comment. The command I used to do this is: 2013-09-11 19:06:20 +00:00
nmap_config.h.in Add a lacking space in the license comment. The command I used to do this is: 2013-09-11 19:06:20 +00:00
nmap_dns.cc Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
nmap_dns.h Revert r32528, was not tested on Windows 2013-11-27 13:32:05 +00:00
nmap_error.cc Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
nmap_error.h Add a lacking space in the license comment. The command I used to do this is: 2013-09-11 19:06:20 +00:00
nmap_ftp.cc Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
nmap_ftp.h Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
nmap_tty.cc Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
nmap_tty.h Revert r32528, was not tested on Windows 2013-11-27 13:32:05 +00:00
nmap_winconfig.h Add a lacking space in the license comment. The command I used to do this is: 2013-09-11 19:06:20 +00:00
NmapOps.cc Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
NmapOps.h Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
NmapOutputTable.cc Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
NmapOutputTable.h Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
nse_binlib.cc Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
nse_binlib.h
nse_bit.cc
nse_bit.h
nse_debug.cc
nse_debug.h
nse_dnet.cc
nse_dnet.h
nse_fs.cc
nse_fs.h
nse_main.cc Revert r32528, was not tested on Windows 2013-11-27 13:32:05 +00:00
nse_main.h Revert r32528, was not tested on Windows 2013-11-27 13:32:05 +00:00
nse_main.lua Escape '%' in arguments to Thread:d. 2014-01-27 22:56:29 +00:00
nse_nmaplib.cc Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
nse_nmaplib.h
nse_nsock.cc Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
nse_nsock.h
nse_openssl.cc
nse_openssl.h
nse_pcrelib.cc Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
nse_pcrelib.h
nse_ssl_cert.cc Add a lacking space in the license comment. The command I used to do this is: 2013-09-11 19:06:20 +00:00
nse_ssl_cert.h Revert r32528, was not tested on Windows 2013-11-27 13:32:05 +00:00
nse_utility.cc
nse_utility.h Use a HAVE_STDINT_H guard. 2013-02-09 22:46:47 +00:00
osscan.cc DB cannot be NULL here. 2013-10-08 21:50:47 +00:00
osscan.h Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
osscan2.cc Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
osscan2.h Use u32 instead of int for all ipids 2013-12-04 12:51:59 +00:00
output.cc Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
output.h Revert r32528, was not tested on Windows 2013-11-27 13:32:05 +00:00
payload.cc Revert r32528, was not tested on Windows 2013-11-27 13:32:05 +00:00
payload.h Add a lacking space in the license comment. The command I used to do this is: 2013-09-11 19:06:20 +00:00
portlist.cc Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
portlist.h Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
portreasons.cc Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
portreasons.h Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
protocols.cc Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
protocols.h Revert r32528, was not tested on Windows 2013-11-27 13:32:05 +00:00
README-WIN32
scan_engine.cc Add a comment to explain numIncompleteHostsLessThan. 2014-01-27 00:44:16 +00:00
scan_engine.h Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
service_scan.cc Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
service_scan.h Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
services.cc Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
services.h Revert r32528, was not tested on Windows 2013-11-27 13:32:05 +00:00
shtool
struct_ip.h Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
Target.cc Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
Target.h Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
TargetGroup.cc Add a lacking space in the license comment. The command I used to do this is: 2013-09-11 19:06:20 +00:00
TargetGroup.h Add a lacking space in the license comment. The command I used to do this is: 2013-09-11 19:06:20 +00:00
targets.cc Add a lacking space in the license comment. The command I used to do this is: 2013-09-11 19:06:20 +00:00
targets.h Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
tcpip.cc Add a lacking space in the license comment. The command I used to do this is: 2013-09-11 19:06:20 +00:00
tcpip.h Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
timing.cc Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
timing.h Replace all tab characters at the beginnings of lines with 8 spaces. 2014-01-05 19:14:26 +00:00
traceroute.cc Add a lacking space in the license comment. The command I used to do this is: 2013-09-11 19:06:20 +00:00
traceroute.h Revert r32528, was not tested on Windows 2013-11-27 13:32:05 +00:00
utils.cc Revert r32528, was not tested on Windows 2013-11-27 13:32:05 +00:00
utils.h Revert r32528, was not tested on Windows 2013-11-27 13:32:05 +00:00
xml.cc Add a lacking space in the license comment. The command I used to do this is: 2013-09-11 19:06:20 +00:00
xml.h Add a lacking space in the license comment. The command I used to do this is: 2013-09-11 19:06:20 +00:00
zenmap.spec.in

Here is some documentation for Nmap, but these files are much less
comprehensive than what you'll find at the actual Nmap documentation
site ( http://nmap.org ).