1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 05:01:29 +00:00
Commit Graph

263 Commits

Author SHA1 Message Date
dmiller
a0b05c0f4f Require trailing '/' to match a directory name with --script. See #2051 2020-08-28 15:06:10 +00:00
dmiller
3635595b24 Do not search NMAPDATADIR on Windows as it is not defined. See #2051 2020-08-28 15:06:08 +00:00
dmiller
030a58a26e Replace 'master' with 'controller thread' in NSE script docs/comments 2020-06-18 17:14:48 +00:00
dmiller
0500811f5a Move string utility functions to stringaux.lua 2018-10-18 01:08:19 +00:00
dmiller
b222a0d7ee Remove bit.lua 2018-08-28 15:56:47 +00:00
dmiller
46eca7f35f Move date/time functions from stdnse to datetime. See #517 2018-08-27 22:00:10 +00:00
dmiller
7d724a69a2 Reduce a level of indirection in traceroute entries in NSE 2018-06-28 03:43:24 +00:00
dmiller
689ea0e05d Spelling corrections. Fixes #1160 2018-03-26 14:59:41 +00:00
dmiller
42fc53fbbf Provide raw OS fingerprint to scripts. See #223 2017-12-10 01:06:34 +00:00
dmiller
69084bbd38 Update scripting documentation 2017-04-21 15:13:08 +00:00
dmiller
c8d5cf86b2 Correct reference to snmpcommunity script-arg. Fixes #861 2017-04-21 13:28:55 +00:00
batrick
7f5ec526fe Merge branch 'nse-lua53'
Lua 5.3 adds several awesome features of particular interest to nmap including
bitwise operators and integers, a utf8 library, and standard binary pack/unpack
functions.

In addition to adding Lua 5.3, this branch changes:

o Complete removal of the NSE bit library (in C), It has been replaced with
  a new Lua library wrapping Lua 5.3's bit-wise operators.

o Complete removal of the NSE bin library (in C). It has been replaced with a
  new Lua library wrapping Lua 5.3's string.pack|unpack functions.

o The bin.pack "B" format specifier (which has never worked correctly) is
  unimplemented.  All scripts/libraries which use it have been updated. Most
  usage of this option was to allow string based bit-wise operations which are no
  longer necessary now that Lua 5.3 provides integers and bit-wise operators.

o The base32/base64 libraries have been reimplemented using Lua 5.3's new
  bitwise operators. (This library was the main user of the bin.pack "B" format
  specifier.)

o A new "bits" library has been added for common bit hacks. Currently only has
  a reverse function.

Thanks to David Fifield, Daniel Miller, Jacek Wielemborek, and  Paulino
Calderon for testing this branch.
2016-07-02 17:02:27 +00:00
dmiller
f4619edece Update http urls for nmap.org to https 2015-11-05 20:41:05 +00:00
dmiller
1a5f4826d7 Correct documentation about the port.version table 2015-02-11 20:20:07 +00:00
jay
4d5950cb42 Add (and document) host.reason and host.reason_ttl 2014-08-10 06:28:58 +00:00
jay
fc5cc15b2c Add port.reason_ttl
Document port.reason and port.reason_ttl
2014-08-10 06:14:00 +00:00
dmiller
3f5e909e8f Spellcheck on docs 2014-02-21 21:10:42 +00:00
fyodor
3daeedd608 Minor rewording for clarity that someone suggested 2013-10-22 00:51:58 +00:00
david
cd90838c2e Change CPE from cpe:/o:linux:kernel to cpe:/o:linux:linux_kernel.
This reflects a deprecation in the official CPE dictionary, which seems
to have happened on 2012-03-08.

  <cpe-item deprecation_date="2012-03-08T20:00:15.120Z" deprecated_by="cpe:/o:linux:linux_kernel:2.6.0" deprecated="true" name="cpe:/o:linux:kernel:2.6.0">
    <title xml:lang="en-US">Linux Kernel 2.6.0</title>
    <meta:item-metadata modification-date="2012-03-08T20:00:15.120Z" status="DRAFT" deprecated-by-nvd-id="35565" nvd-id="91585" />
  </cpe-item>
2012-10-11 06:46:28 +00:00
david
afd483a2d6 Key digest output convention. 2012-09-08 16:22:23 +00:00
david
170df4fa54 Add docs section on structured output conventions.
Covering stdnse.format_timestamp.
2012-09-08 16:09:21 +00:00
david
1b93346162 Update condvar doc example to match r29695. 2012-08-29 10:22:17 +00:00
kroosec
7f7a7a3795 Updating documentation to reflect rpc-grind change. 2012-08-17 18:32:26 +00:00
david
147a17d2b6 Add @xmloutput to docs/scripting.xml. 2012-08-16 12:14:54 +00:00
david
0c3e0fcc4d Structured script output.
Scripts may now return a key–value table, or such a table in addition to
a string. The table will be automatically formatted for normal output
and will appear as a hierarchy of elements in XML output.

Some history and discussion of this development can be found at
https://secwiki.org/w/Nmap/Structured_Script_Output.

This is a merge of r29484:29569 from /nmap-exp/david/xml-output.
2012-08-14 16:36:25 +00:00
david
bfd5d7c2ba Remove references to obsolete stdnse.c library. 2012-08-08 19:21:44 +00:00
david
a2c2863531 Remove "hardmatched" argument from calls to nmap.set_port_version.
This is the default and can be omitted. Seeing as the value of this
argument was "hardmatched" in 100% of cases, we're better off pretending
the parameter doesn't exist.
2012-07-30 18:58:32 +00:00
fyodor
f78b11d50e Give an example license line for folks who want to use a BSD-style license for their scripts 2012-07-19 23:22:24 +00:00
dmiller
3e71473630 Update scripting.xml to reflect Lua 5.2
Changed links to Lua reference manual to point to appropriate sections
for 5.2. Books (Reference Manual and Programming in Lua, 2nd ed.) have
not been updated to 5.2 yet, so those were left alone.

Documented the change in API for linking C libs (luaL_newlib and
luaL_Reg vs luaL_register and luaL_reg).
2012-06-28 20:09:36 +00:00
david
b5a9bca6dc Change the structure of host.os tables.
Previously they were a flat list intermixing human-readable names and
CPE strings. Now they reflect the structure that we use to represent
them. In brief:

host.os = {
  {
    name = "Microsoft Windows XP",
    classes = {
      {
        vendor = "Microsoft",
        osfamily = "Windows",
        osgen = "XP",
        type = "general purpose",
        cpe = {
          "cpe:/o:microsoft:windows_xp"
        }
      },
      ... more classes ...
    },
  },
  ... more OS matches ...
}
2012-03-09 02:32:30 +00:00
fyodor
1623bcfa66 Update --script-args to note that many scripts qualify their arguments with the script name, and that you can pass unqualified arguments to affect every script using that name. Also updated scripting.xml to emphasize that instead of using nmap.registry.args directly, scripts should get their arguments with stdnse.get_script_args. Regenerated the nroff too after making these changes to the source XML 2012-03-01 08:56:45 +00:00
patrik
72af4637b0 o [NSE] Added host based registry, which allows scripts to share data between
scripts scanning a specific host. [Patrik]
2012-02-22 20:03:15 +00:00
david
60063bbd18 Add a missing DocBook close tag. 2012-01-18 00:26:38 +00:00
henri
487c08ff63 Make gathered CPE codes available to NSE.
CPEs are available at host.os (for the ones from OS fingerprinting) and
port.version.cpe (for the version detection ones).

This patch also fix a memory leak that David noticed in
PortList::setServiceProbeResults().
2012-01-13 10:24:19 +00:00
fyodor
bb62bab448 o Added the new --script-args-file option which allows you to specify
the name of a file containing all of your desired NSE script
  arguments.  The arguments may be separated with commas or newlines
  and may be overridden by arguments specified on the command-line
  with --script-args. [Daniel Miller]
2012-01-03 07:14:20 +00:00
fyodor
9276d6f6fc More clearly note the cases where the target mac address is available to NSE 2011-12-20 22:57:43 +00:00
fyodor
c255745299 oops, said prerule when I meant portrule 2011-12-19 21:29:37 +00:00
fyodor
59f8b931f1 document new script force feature 2011-12-19 21:07:01 +00:00
david
fd556a76fe Make dnet:ip_send able to send IPv6. 2011-10-29 19:40:16 +00:00
fyodor
c9d610ccea Create a new brute category for brute forcing scripts, move the *-brute scripts from auth category to brute. document it. I don't know what to do with dns-brute so I left it alone (it wasn't in auth category either) 2011-09-30 06:18:55 +00:00
david
53f46fd746 Note that bin_ip and bin_ip_src work for IPv6 in scripting.xml. 2011-06-25 02:28:01 +00:00
fyodor
c4f133158b Add a real-life postrule example now that we have one 2011-03-29 00:01:58 +00:00
david
b9ffdfb9d0 Document new search path procedure in refguide.xml. 2011-03-26 06:48:34 +00:00
fyodor
f0e7b6d3ab made a couple minor improvements suggested by G.W. Haywood 2011-03-03 07:13:39 +00:00
djalal
f8b55e3253 Make the use of the SCRIPT_TYPE environment variable clearer. 2011-02-14 21:04:52 +00:00
djalal
d1b34654b8 Fix a bug which caused some NSE scripts to fail, due to the absence of
the NSE SCRIPT_NAME environment variable when the scripts are loaded.
Reported by Michael Pattrick.
2011-01-30 23:31:57 +00:00
david
8d5edf66c3 Fix some XML syntax errors in scripting.xml. 2011-01-28 18:12:52 +00:00
david
8553cb3157 Merge r22026 through r22063 from /nmap-exp/david/nmap-script-help (new
--script-help option).
2011-01-27 21:44:54 +00:00
david
291ab7488d Document the "broadcast" script category. 2011-01-13 06:21:55 +00:00
fyodor
c72965c3e5 Add a section 'Script Types and Phases' to discuss and distinguish prerule, host, service, and postrule scripts (definitely has room for improvement). Removed some phase content from the front (introduction) page to keep it clean. Added a link to the Nmap NSE video 2010-10-11 23:08:04 +00:00