Commit Graph

128 Commits

Author SHA1 Message Date
david 976a27755d Add line breaks to the code example in openssl.luadoc. 2008-10-19 00:38:02 +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 dafa60743b Break description summaries in http.lua into their own paragraphs. 2008-10-16 23:37:54 +00:00
david 06b661f2ef Fix the documentation for nmap.new_try, because it was incorrect. The result of
nmap.new_try is not a function accepting another function, it is a function
taking a variable number of arguments, assumed to be the return value of some
function. In other words, the returned try function is not responsible for
running other functions, it only sees their return values.
2008-10-16 22:21:08 +00:00
david 3ff15bf16d Document the socket, pcap, and dnet functions in nselib/nmap.luadoc. 2008-10-16 20:33:23 +00:00
david 77374fb284 Merge and format documentation for functions in nselib/nmap.luadoc. A lot of
functions are missing, notable the socket methods. I'll add those next.
2008-10-16 17:28:12 +00:00
david 16052f05e5 Add an example of testing for the availability of the openssl module in
nselib/openssl.luadoc.
2008-10-16 17:04:06 +00:00
sven 1f726dd386 do not use try() in ssh1 and ssh2 library because a network error occurring in the library would otherwise stop the complete script 2008-10-16 11:05:52 +00:00
david 0ec5373496 Add a period at the end of the first paragraph in nselib/pcre.luadoc. This
makes the current summarizer extract just that for the summary.
2008-10-16 04:17:18 +00:00
david c30776fec7 Add luadoc files for openssl and pcre. That finishes the modules in the section
"Lua Extensions", which is now just a stub.
2008-10-16 04:08:53 +00:00
david 99c30b1d1b Merge documetation for unpwdb, url, bit, tab, base64, and bin. 2008-10-16 03:18:03 +00:00
david 6dde8008d7 Add
module "bit"
to nselib/bit.luadoc. That makes it show up in the generated documentation.
2008-10-16 02:59:51 +00:00
david f58f559b81 Reformat and merge documentation for stdnse, shortport, strbuf, snmp, ssh1,
ssh2, smb, pop3, and msrpc.
2008-10-16 00:38:53 +00:00
david a31f0890d5 Document the packet NSE module. 2008-10-15 23:09:51 +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
batrick 4b17b36913 Added unpwdb library documentation. 2008-10-15 20:36:24 +00:00
sven 5d12eb7a3d add missing local reference to error() to stdnse 2008-10-12 18:39:00 +00:00
sven d8714befb1 merging nse_openssl branch 2008-10-08 22:21:41 +00:00
sven 8f83450228 revert tonumber() conversion in stdnse.tohex() because tonumber() discards whitespace 2008-10-07 07:28:10 +00:00
batrick 2c6554a435 Updated stdnse.tohex() to coerce strings to numbers if possible for the first
argument. That is, the first argument is interpretted as a number if possible.
2008-10-07 02:24:31 +00:00
batrick f71135f796 Changed stdnse.tohex to no longer create tables unnecessarily if options
are ommitted.
2008-10-07 02:22:17 +00:00
fyodor 84bb81d6ee 1-line fix from Jah:
The attached fixes an error in ipOps.ip_to_bin() when a string is passed
to stdnse.tohex().  This should always be (and should always have been)
a number.
2008-10-07 02:17:08 +00:00
sven 6057449ae0 add comments to stdnse.tohex() 2008-10-06 09:52:55 +00:00
sven 2dd98df5b9 don't split and concat hex string in stdnse.tohex() if no separator is given 2008-10-06 09:29:27 +00:00
david ae7455279e Add a new msrpc.lua module, plus new scripts smb-enumdomains.nse,
smb-enumshares.nse, and smb-enumusers.nse. Also enhance the netbios.lua and
smb.lua modules. Remove the smb-enum.nse script. All these changes are from Ron
Bowes.
2008-10-04 21:58:39 +00:00
sven 565a5ee3ed o Enhanced the tohex() function in the NSE stdnse library to support strings
and added options to control the formatting. [Sven]
2008-10-03 19:55:58 +00:00
sven 83ec6aa665 It is unnecessary to prefer targetname over the ip in the request()
function since host is only passed to socket:connect() which would have to
resolve the targetname back to the ip.
2008-10-03 17:17:45 +00:00
david d8e40a3546 Add Sven's modifications to http.lua. In his words:
It is unnecessary to prefer targetname over the ip in the request()
function since host is only passed to socket:connect() which would have to
resolve the targetname back to the ip.
I've rewritten the header/body separation to use a single regex which
should do the same as your code and since the first match is non-greedy
should always prefer the shorter version.
I've done something similar for the header splitting.
I've removed the type checks for header and body since they are always
strings.
2008-10-03 15:43:38 +00:00
david ebaf939f5f Make the http NSE module better handle different delimiters in the headers of
messages (and in the body when chunked encoding is used). The patch is from
jah.
2008-10-03 01:00:55 +00:00
fyodor 2c00352b8e make timing a little more conservative 2008-09-15 19:05:00 +00:00
david 3121ac156d Make DNS timeouts dependent on the timing template. Patch by jah. See
http://seclists.org/nmap-dev/2008/q3/0702.html.
2008-09-15 18:56:54 +00:00
david f054d25d1f Adjust the categories of the new SMB scripts. Also fix a couple of
documentation typos.

smb-os-discovery.nse
-categories = {"version","default"}
+categories = {"default", "discovery", "safe"}
 
smb-enum.nse
-categories = {"version","intrusive"}
+categories = {"discovery", "intrusive"}
 
smb-security-mode.nse
-categories = {"version"}
+categories = {"discovery", "safe"}
2008-09-15 18:10:00 +00:00
david 9eff25bbc4 Add Ron Bowes's netbios and smb NSE modules and new scripts that use them. They
were introduced in http://seclists.org/nmap-dev/2008/q3/0827.html.
2008-09-15 17:58:38 +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
david dfdf8a5752 Move the new version of dns.reverse that does IPv6 reverse lookups out of
ASN.nse and into the dns library.
2008-09-06 03:45:37 +00:00
david fdcbd083b3 Add the expanded nselib/ipOps.lua that contains many of the utility functions
used by whois.nse and ASN.nse.
2008-09-06 03:28:12 +00:00
kris 0399bc71c5 Give dns.lua default module name like the others if absent 2008-09-05 18:59:31 +00:00
fyodor f67049b2d3 o Fix a bug in the NSE http library which would cause some scripts to
give the error: SCRIPT ENGINE: C:\Program
  Files\Nmap\nselib/http.lua:77: attempt to call field 'parse' (a nil
  value) [Jah]

Also added Win2K dependencies section to nmap-install (I should have
done a separate checkin for that)
2008-09-03 06:22:13 +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
fyodor c5a6e3844f o Added new addrow() function to NSE tab library. It allows
developers to add a whole row at once rather than doing a separate
  add() call for each column in a row. [Sven Klemm]
2008-08-30 19:38:51 +00:00
fyodor 8b29c19a76 o The NSE http library now supports chunked encoding. [Sven Klemm] 2008-08-29 09:24:24 +00:00
fyodor dc74809a68 Applied patch from Jah:
Attached corrects answerFetcher[types.TXT]() in dns.lua which inserts
v.data into answers only if v.domain is present - I believe the test
should be for v.data.  This was preventing TXT answers from being
returned from dns.query() with the retAll option.
2008-08-26 01:01:27 +00:00
pgpickering 9e6a88ad67 changed option in dns.lua 2008-08-21 10:00:25 +00:00
pgpickering d8bb0e8c73 added NSE DNS library 2008-08-21 09:38:28 +00:00
pgpickering 3c9833b57c added nsedoc documentation for the binlib 2008-08-21 09:12:19 +00:00
pgpickering 1936743c81 removed obsolete debug output 2008-08-18 17:56:32 +00:00
batrick 670792a4a6 Updated all libraries documentation.
packet and url both need more work.
2008-08-18 04:03:45 +00:00