Nmap - the Network Mapper. Github mirror of official SVN repository. https://svn.nmap.org/
Find a file
batrick 1cec0a305b Run rule functions in the main loop.
This allows usage of verbose/debug in portrule/hostrule and access to all
functionality of NSE, including sockets. So for example, we can now do:

function portrule (host, port)
  local response = http.get(host, port, "/");
  stdnse.debug1(response.body)
  ...
end

The verbose/debug function did not work in rule functions because the
introspection API (getid, gettid, etc.) only work when NSE is in the main loop.
The main loop sets the required internal variable current needed by the API.

List of changes:

stdnse.lua:

  o debug/verbose check the debugging/verbosity level much earlier to allow
    returning if nothing will be printed.

  o Simplified debug/verbose logic to handle the optional first argument
    better.

  o made debug/verbose local functions to avoid using globals and allow self
    tail calls

nse_main.lua:

  o The logic for adding threads via a rule function is simplified. So long as
    the script has the desired rule function, a thread is always returned.
    Evaluation of the rule function is done while NSE is in the main loop (i.e.
    not in script:new_thread()). The rule function only determines if the action
    function is run.

  o [Not a change:] If the action function will be run or was run then we see
    the usual "Starting X" and "Finished X" messages from NSE.

  o Use Lua 5.2's pack function instead of the slightly more expensive
    {n = select("#", ...), ...} idiom.

  o New stdnse.getinfo introspection function which is used by stdnse.debug.
2014-08-02 21:18:08 +00:00
docs Add NSEdoc to re.lua 2014-07-31 14:39:35 +00:00
libdnet-stripped Fix rt_msghdr padding on NetBSD. 2013-06-01 16:28:44 +00:00
liblinear
liblua Update bundled liblua from 5.2.2 to 5.2.3 2014-01-02 15:33:55 +00:00
libnetutil Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
libpcap Modify libpcap configure script to disable unused features 2014-06-11 18:19:25 +00:00
libpcre Merged Lpeg branch 2014-06-26 20:12:54 +00:00
macosx Target Mac OS X 10.6 in the Mac bundles. 2013-11-12 04:59:07 +00:00
mswin32 Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
nbase Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
ncat Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
ndiff Fix make ndiff_check spurious failure 2014-05-22 02:25:47 +00:00
nmap-update Spellcheck on Nmap, Nsock, Nbase source files 2014-02-20 18:44:12 +00:00
nping Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
nselib Run rule functions in the main loop. 2014-08-02 21:18:08 +00:00
nsock Let nsock use /bin/sh instead of Bash for testing 2014-08-02 04:38:04 +00:00
scripts stdnse.print_verbose -> stdnse.verbose1 2014-08-02 18:32:26 +00:00
todo Added --exclude-ports option to Nmap 2014-07-04 05:47:11 +00:00
zenmap Reduce Zenmap's Topology noise by collapsing equivalent 'anonymous' nodes 2014-07-30 06:37:24 +00:00
acinclude.m4
aclocal.m4
BSDmakefile
CHANGELOG Adds mikrotik-routeros-brute to the CHANGELOG. 2014-07-30 03:51:56 +00:00
charpool.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
charpool.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +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 Update configure from configure.ac after r33055 (whitespace) 2014-06-26 02:53:55 +00:00
configure.ac Fix whitespace in configure.ac. 2014-06-24 09:25:09 +00:00
COPYING Missed the COPYING file in the last commit :P 2014-08-02 19:32:53 +00:00
depcomp
FingerPrintResults.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
FingerPrintResults.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
FPEngine.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
FPEngine.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
FPModel.cc Get rid of double newline at the EOF I accidentally introduced in the 2014-06-18 11:30:02 +00:00
global_structures.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
HACKING
idle_scan.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
idle_scan.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
INSTALL
lpeg.c Merged Lpeg branch 2014-06-26 20:12:54 +00:00
ltmain.sh
MACLookup.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
MACLookup.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
main.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
Makefile.in Merged Lpeg branch 2014-06-26 20:12:54 +00:00
missing
nmap-header-template.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
nmap-mac-prefixes Updated MAC Address prefixes from IEEE data 2014-08-02 01:19:55 +00:00
nmap-os-db Process 177 more OS fingerprint submissions 2014-07-21 03:59:39 +00:00
nmap-payloads Spellcheck: common misspellings in the entire source tree 2014-02-21 21:10:51 +00:00
nmap-protocols Update nmap-protocols from IANA (5 additions) 2013-04-12 17:29:18 +00:00
nmap-rpc
nmap-service-probes Remove use of branch-reset pattern from nmap-service-probes 2014-07-24 21:28:58 +00:00
nmap-services Change EtherNet/IP-2 service name to IANA standard EtherNet-IP-2 2014-05-22 18:25:07 +00:00
nmap.cc Fix a typo in nmap.cc 2014-08-02 19:35:31 +00:00
nmap.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
nmap.spec.in Add "AutoReqProv:no" because automatic dependency calculation was adding "python(abi) = 2.4" even though our setup.py takes care of adjusting sys.path to point to wherever the modules were installed. We use this same approach for Zemap. Hopefully this doesn't cause problems. There were the dependencies before this change: 2014-04-11 23:12:35 +00:00
nmap_amigaos.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +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 Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
nmap_dns.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
nmap_error.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
nmap_error.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
nmap_ftp.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
nmap_ftp.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
nmap_tty.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
nmap_tty.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
nmap_winconfig.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
NmapOps.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
NmapOps.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
NmapOutputTable.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
NmapOutputTable.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
nse_binlib.cc Get rid of double newline at the EOF I accidentally introduced in the 2014-06-18 11:30:02 +00:00
nse_binlib.h Add newlines at the EOF in conformance to Daniel's coding standards 2014-06-18 10:18:58 +00:00
nse_bit.cc Get rid of double newline at the EOF I accidentally introduced in the 2014-06-18 11:30:02 +00:00
nse_bit.h Add newlines at the EOF in conformance to Daniel's coding standards 2014-06-18 10:18:58 +00:00
nse_debug.cc Get rid of double newline at the EOF I accidentally introduced in the 2014-06-18 11:30:02 +00:00
nse_debug.h
nse_dnet.cc Get rid of double newline at the EOF I accidentally introduced in the 2014-06-18 11:30:02 +00:00
nse_dnet.h Add newlines at the EOF in conformance to Daniel's coding standards 2014-06-18 10:18:58 +00:00
nse_fs.cc Get rid of double newline at the EOF I accidentally introduced in the 2014-06-18 11:30:02 +00:00
nse_fs.h Add newlines at the EOF in conformance to Daniel's coding standards 2014-06-18 10:18:58 +00:00
nse_lpeg.cc Merged Lpeg branch 2014-06-26 20:12:54 +00:00
nse_lpeg.h Merged Lpeg branch 2014-06-26 20:12:54 +00:00
nse_main.cc Merged Lpeg branch 2014-06-26 20:12:54 +00:00
nse_main.h Add newlines at the EOF in conformance to Daniel's coding standards 2014-06-18 10:18:58 +00:00
nse_main.lua Run rule functions in the main loop. 2014-08-02 21:18:08 +00:00
nse_nmaplib.cc Add the nmap.version_intensity() function for use in NSE version scripts. Modify shortport.version_port_or_service() to also take a rarity parameter. 2014-07-30 07:05:58 +00:00
nse_nmaplib.h
nse_nsock.cc Get rid of double newline at the EOF I accidentally introduced in the 2014-06-18 11:30:02 +00:00
nse_nsock.h Add newlines at the EOF in conformance to Daniel's coding standards 2014-06-18 10:18:58 +00:00
nse_openssl.cc sed -i 's/if ( /if (/g' *.cc *.h; sed -i 's/for ( /for (/g' *.cc *.h; sed -i 's/( /(/g' nmap_amigaos.h tcpip.h service_scan.cc 2014-06-25 15:40:54 +00:00
nse_openssl.h Add newlines at the EOF in conformance to Daniel's coding standards 2014-06-18 10:18:58 +00:00
nse_pcrelib.cc Got rid of (unnecessary) spaces in blank lines in *.cc and *.h files. 2014-06-19 11:36:10 +00:00
nse_pcrelib.h
nse_ssl_cert.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
nse_ssl_cert.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
nse_utility.cc Get rid of double newline at the EOF I accidentally introduced in the 2014-06-18 11:30:02 +00:00
nse_utility.h Add newlines at the EOF in conformance to Daniel's coding standards 2014-06-18 10:18:58 +00:00
osscan.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
osscan.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
osscan2.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
osscan2.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
output.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
output.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
payload.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
payload.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
portlist.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
portlist.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
portreasons.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
portreasons.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
protocols.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
protocols.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
README-WIN32
scan_engine.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
scan_engine.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
service_scan.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
service_scan.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
services.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
services.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
shtool
struct_ip.h Add newlines at the EOF in conformance to Daniel's coding standards 2014-06-18 10:18:58 +00:00
Target.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
Target.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
TargetGroup.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
TargetGroup.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
targets.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
targets.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
tcpip.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
tcpip.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
timing.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
timing.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
traceroute.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
traceroute.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
utils.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
utils.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
xml.cc Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
xml.h Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +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 ).