1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00
Commit Graph

28 Commits

Author SHA1 Message Date
dmiller
d81ead72dc New C backend for datafiles.lua; avoid copies of large data sets 2022-09-29 22:19:28 +00:00
dmiller
f4619edece Update http urls for nmap.org to https 2015-11-05 20:41:05 +00:00
dmiller
5aca2bd4f1 Correct some NSEdoc regarding datafiles.parse_file return values 2014-12-18 00:22:44 +00:00
batrick
ee6622aea4 nselib stdnse.print_debug -> stdnse.debug
$ f() { find -name \*.lua -exec /bin/echo sed -i "$1" {} \; ; }
$ f 's/stdnse.print_debug( *\([0-9]*\) *, */stdnse.debug\1(/'
$ f 's/stdnse.print_debug( *"\(.*\))/stdnse.debug1("\1)/'
2014-08-03 00:56:45 +00:00
dmiller
961ea25225 Re-indent some NSE libraries.
https://secwiki.org/w/Nmap/Code_Standards
2014-02-03 19:47:34 +00:00
dmiller
620f9fdb34 Remove trailing whitespace in lua files
Whitespace is not significant, so this should not be a problem.
https://secwiki.org/w/Nmap/Code_Standards
2014-01-23 21:51:58 +00:00
patrik
bca0025032 nse_check_global cleanup 2012-07-29 09:26:23 +00:00
dmiller
b868e7f3ce Move caching code to datafiles lib
Scripts no longer need to implement caching of datafiles tables in the
registry, since the datafiles.lua library keeps its own cache in the
registry. A side-effect is that scripts should not change the tables
returned by datafiles.parse_{protocols,rpc,services,mac_prefixes}(), as
doing so will affect all other scripts that use those functions.
2012-07-27 20:07:38 +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
djalal
afe98e8d80 Fix a bug that was causing the read_from_file() to not return the correct file lines. 2010-12-14 10:20:23 +00:00
batrick
86993d74d5 Use better construction for iterating lines. 2010-12-08 14:18:45 +00:00
david
7d0c08a097 Brief copyediting of NSEDoc for modules. 2010-07-12 19:42:43 +00:00
david
84a388aeb9 Give datafiles.lua the ability to parse nmap-mac-prefixes, and use it in
nbstat.nse to look up the MAC vendor string.
2010-02-26 00:27:30 +00:00
batrick
90a712ae2b Patch to libraries that were inappropriately using globals.
Often two (or more) scripts using the same library would
overwrite the globals each was using. This would result
in (at best) an error or (at worst) a deadlock.

The patch changes the global accesses to local.
2009-07-07 00:20:52 +00:00
batrick
fe6c84fe00 Corrected legacy use of the 'arg' table for manipulating varargs. 2009-01-31 02:11:11 +00:00
david
5f166e19ec Don't use empty parentheses when referring to functions by name in NSE
documentation.
2008-11-07 22:49:49 +00:00
david
114e1420bb Proofread and update documentation format in base64, bin, bit, comm, datafiles,
and dns.
2008-10-24 03:56:55 +00:00
david
7e15f259a4 Standardize the @copyright fields of NSE modules; change "See nmaps COPYING for
license" to "Same as Nmap--See http://nmap.org/book/man-legal.html" like
scripts commonly use. I added the field to some modules I know to be under the
Nmap license: bin, datafiles, dns, nmap, unpwdb. I left alone bin, bit, pcre,
and url, which come from outside sources.
2008-10-24 00:44:22 +00:00
jah
eacb951209 Fixed typos for some nsedoc tag names:
INFO processing file `nselib/datafiles.lua'
ERROR undefined handler for tag `type'
INFO processing file `nselib/dns.lua'
ERROR undefined handler for tag `result'
ERROR undefined handler for tag `result'
INFO processing file `nselib/netbios.lua'
ERROR undefined handler for tag `returns'
INFO processing file `nselib/snmp.lua'
ERROR undefined handler for tag `result'
INFO processing file `scripts/SSLv2-support.nse'
ERROR undefined handler for tag `ouput'

Removed a @see tag which refers to Lua's string.format rather than to NSE docs:
INFO generating file `docs/modules/stdnse.html'
ERROR unresolved reference to symbol `string.format'
2008-10-18 20:49:00 +00:00
david
6e69be898a Small NSE documentation fixes: "nmap-protocol" -> "nmap-protocols" in
datafiles.lua, and remove not-too-relevant vulnerability IDs from
dns-test-open-recursion.nse.
2008-10-17 19:22:06 +00:00
david
12e34eb5b0 Reformat and merge documentation for some NSE modules: comm, datafiles, dns,
http, ipOps, listop, and match. This is mainly merging the best documentation
from the module source and scripting.xml into the module, with the aim of
making the source code the canonical source for module documentation.
2008-10-15 22:03:14 +00:00
sven
9a6d9beaa5 bugfixes and typo fixes for datafiles.lua by jah:
- not returning services in the same fashion as parse_services(protocol) did
 - bad logic prevented parse_file( filename, { } ) from returning an array 
   of lines where filename was one of Nmap's data files (as it does for
   other files)
 - creating a table key with a value of nil when the pattern for the key
   matches, but the pattern for the value doesn't - this was made most
   obvious by the recent changes as it prevented them returning the correct
   data
2008-09-12 07:14:25 +00:00
sven
7e74e443be datafiles.lua:
- make get_array() and get_assoc_array() normal functions
 - move nmap.fetch_file() call to read_from_file()
 - remove constraining input checks
2008-09-12 07:02:24 +00:00
sven
711223b6fe change datafiles.lua to use nmap.fetch_file() directly 2008-09-09 16:55:05 +00:00
fyodor
e30ba96035 o The NSE datafiles library now has generic file parsing routines, and
the parsing of the standard nmap data files (e.g. nmap-services,
  nmap-protocols, etc.) now uses those generic routines.  NSE scripts
  and libraries may find them useful for dealing with their own data
  files, such as password lists. [Jah]
2008-09-03 02:42:02 +00:00
batrick
670792a4a6 Updated all libraries documentation.
packet and url both need more work.
2008-08-18 04:03:45 +00:00
batrick
462c289f4a Fixed all the modules to give a default name if absent.
Also necessary for the documentation system to know the name
of the module.
2008-08-16 04:20:15 +00:00
kris
8530569047 Adding my Datafiles NSElib for parsing the nmap-* data files for scripts and also update rpcinfo.nse to use this library. Includes CHANGELOG and docs/scripting.xml updates 2008-03-30 20:33:33 +00:00