1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 14:11:29 +00:00
Commit Graph

35 Commits

Author SHA1 Message Date
dmiller
2543f2dd3c Refactor to avoid using packet.lua local functions. See #2464 2022-04-14 23:06:02 +00:00
dmiller
26ef852a28 Move stdnse.generate_random_string to new rand.lua 2018-09-08 17:07:06 +00:00
rewanth
d9504537e6 Removes unused dependencies from all files in scripts folder. 2017-08-15 07:26:00 +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
cb4b46bd53 Canonicalize authors as tables instead of comma-separated strings 2016-06-09 22:46:42 +00:00
paulino
51c6260f85 Fixes usage documentation 2016-06-05 20:06:25 +00:00
dmiller
f4619edece Update http urls for nmap.org to https 2015-11-05 20:41:05 +00:00
dmiller
339f0ffd7d Fix NSEdoc: wrap lines, fix bulleted lists 2015-07-11 04:01:05 +00:00
dmiller
0e74dd7a35 Replace some string.char and bin.pack calls with literals 2015-02-27 19:42:56 +00:00
dmiller
204d37e4d7 Replace packet.toip* and ip*tobin with ipOps.ip_to_str and str_to_ip 2015-02-27 19:42:46 +00:00
tomsellers
10822d1633 More script updates to change Metasploit Redmine
references to valid Github URLs
2015-01-01 15:13:13 +00:00
batrick
810f7d4803 more stdnse.print_debug -> stdnse.debug
This is a catchall pattern with a few exclusions.

$ sed -i 's/stdnse.print_debug( *\([0-9]*\) *, *\(.*\))/stdnse.debug\1(\2)/' *.nse
$ sed -i 's/stdnse.print_debug(\(.*\))/stdnse.debug1(\1)/' *.nse

Excluded:
$ svn revert db2-das-info.nse
$ svn revert flume-master-info.nse
$ svn revert http-headers.nse
$ svn revert http-methods.nse
$ svn revert http-unsafe-output-escaping.nse
$ svn revert http-userdir-enum.nse
$ svn revert http-vuln-cve2011-3192.nse
$ svn revert http-vuln-wnr1000-creds.nse
$ svn revert http-wordpress-plugins.nse
$ svn revert telnet-brute.nse
2014-08-02 02:46:16 +00:00
dmiller
1b71f75aad Spelling fixes for Lua files
Mostly in documentation/comments, but a couple code bugs were caught,
including a call to stdnse.pirnt_debug and a mis-declared variable.
2014-02-19 04:15:46 +00:00
dmiller
d309fecd12 Re-indent some more scripts. Whitespace-only commit
https://secwiki.org/w/Nmap/Code_Standards
2014-02-02 15:33:29 +00:00
dmiller
197f28265f New function stdnse.format_mac
This function will format a MAC address as colon-separated hex bytes.
It's really very simple: stdnse.tohex(mac, {separator=":"})

This commit updates all the instances I could find of the varying
convoluted attempts at performing this conversion.
2014-01-16 21:50:30 +00:00
patrik
448bb5a71b fixed a bug in a loop where the script would wait for a condition that was
supposed to be signalled by other threads which were no longer running.
2012-08-29 05:37:56 +00:00
batrick
2dcb08a590 Fix location of try/catch. The pcap/dnet variables were not in scope. 2012-06-06 21:36:02 +00:00
batrick
000f6dc4d9 Lua 5.2 upgrade [1] for NSE.
[1] http://seclists.org/nmap-dev/2012/q2/34
2012-05-27 08:53:32 +00:00
henri
1f431b953f Consistent naming of the address fields between IPv4 and IPv6.
All IP packet objects now have the following attributes:

  - ip_bin_src (binary src address)
  - ip_bin_dst (binary dst address)
  - ip_src (decimal-dotted string src address)
  - ip_dst (decimal-dotted string dst address)

The ip6_src and ip6_dst attributes have therefore been renamed (ip_bin_src and
ip_bin_dst).

This patch also updates the scripts accordingly.
2012-01-21 14:46:00 +00:00
david
1c297f9138 Check target.ALLOW_NEW_TARGETS. 2011-10-07 09:51:10 +00:00
david
2a696bc6ef Add @output to targets-ipv6-multicast-*. 2011-10-07 09:51:09 +00:00
david
705590ef47 Include MAC and interface name in targets-ipv6-multicast-* output. 2011-10-07 09:51:08 +00:00
david
0d6da1b8d3 Use all interfaces by default in targets-ipv6-multicast-*. 2011-10-07 09:51:07 +00:00
david
9e7db09d40 Show found addresses in targets-ipv6-multicast-*.
This is similar to a patch submitted by Daniel Miller.
2011-10-07 09:51:05 +00:00
fyodor
131dccc5d2 Some (mostly minor rewording) NSEDoc updates 2011-09-29 22:06:23 +00:00
tomsellers
1c92c03401 Add a few scripts to the "broadcast" script category based on traffic behavior. 2011-09-11 11:58:18 +00:00
david
4d0a8a27b1 Show a visible error when targets-ipv6-* are run without an interface. 2011-09-08 16:11:21 +00:00
weilin
f1ef57e961 o [NSE] Check the link type of the interface before sending the multicast host discovery probe. 2011-09-03 12:57:37 +00:00
djalal
fbd74b9d46 o [NSE] Use nmap.get_interface_info() to retrieve the interface information. 2011-09-03 10:38:38 +00:00
david
64722d1b7b Better docs for targets-ipv6-* scripts. 2011-09-02 04:11:06 +00:00
david
c497fb37a7 Remove unconditional debugging output from targets-ipv6-* scripts. 2011-09-02 04:11:05 +00:00
david
8d715c7a48 Remove the ipv6.src script argument. 2011-09-02 04:11:03 +00:00
david
5f217dee0a Use the SCRIPT_NAME prefix on the "interface" arg. 2011-09-02 04:11:02 +00:00
david
a0e4664f21 Whitespace. 2011-09-02 04:11:01 +00:00
david
113ef12106 Add IPv6 multicast host discovery scripts from Weilin. 2011-09-02 04:11:00 +00:00