1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 06:01:28 +00:00
Commit Graph

34 Commits

Author SHA1 Message Date
kris
33fa744392 fix function name typo in @usage doc 2010-07-24 20:24:55 +00:00
kris
cc33a59ca4 Add nmap.clock() for providing scripts with the current time in floating
point seconds since the epoch, and add clock_ms() and clock_us() to stdnse
for convenience (millisecond and microsecond).

qscan.nse now provides microsecond resolution.
2010-07-23 19:49:42 +00:00
kris
ee3c89afe4 o [NSE] When receiving raw packets from Pcap, the packet capture time
is now available to scripts as an additional return value from
  pcap_receive().  It is returned as the floating point number of
  seconds since the epoch.  The qscan.nse script was updated to use
  this more accurate data instead of using the clock_ms() function
  (which returns the current time). [Kris]
2010-07-23 10:43:04 +00:00
david
7d0c08a097 Brief copyediting of NSEDoc for modules. 2010-07-12 19:42:43 +00:00
david
1038dc8bcd Fix an error in the documentation for get_ssl_certificate. 2010-06-13 23:34:13 +00:00
kris
a42ea72a97 Merge through r16884 from /nmap-exp/kris/nse-rawip plus the following changelog
entries:

o [NSE] Raw packet sending at the IP layer is now supported, in addition to
  the Ethernet sending functionality.  Packets to send start with an IPv4
  header and can be sent to arbitrary hosts. [Kris]

o [NSE] Added the ipidseq script to classify a host's IP ID sequence numbers
  in the same way Nmap does.  This can be used to test hosts' suitability for
  Nmap's Idle Scan (-sI), i.e. check if a host is an idle zombie.  This is
  the first script to use the new raw IP sending functionality in NSE. [Kris]

o [NSE] Added the function nmap.is_privileged() to tell a script if, as far
  as Nmap's concerned, it can do privileged operations.  For instance, this
  can be used to see if a script should be able to open a raw socket or
  Ethernet interface. [Kris]

o [NSE] Added the function nmap.get_ports() to allow a script to iterate
  over a host's port tables matching a certain protocol and state. [Kris,
  Patrick]
2010-02-26 20:42:10 +00:00
kris
003cc98eab nmap.luadoc typos 2010-02-12 23:41:56 +00:00
batrick
da041cb0b3 Get rid of <em>/<strong> tags because there is no uniform
way to use them across DocBook and HTML.
2010-01-16 01:59:12 +00:00
batrick
d1a4984d8d Fixed a typo. 2010-01-16 01:38:38 +00:00
batrick
e94da5d874 Use em/strong tags instead of <b>. 2010-01-10 03:18:05 +00:00
batrick
2b3df5882f [NSE] Patch to add worker threads to NSE for scripts to use. Right
now a script is limited in parallelism to working on one socket at any
time. A script can now create a worker thread that will be capable of
doing work on sockets in parallel with the parent script. See [1] for
more information.

This patch also comes with condition variables that are similar to
POSIX condition variables. They are used in the same fashion as
NSE's mutexes (nmap.mutex).

[1] http://seclists.org/nmap-dev/2009/q4/294
2009-11-12 01:33:52 +00:00
batrick
8f3ecdbb8b Cleaned up documentation for mutexes. Also added note that NSE
only maintains a weak reference in the background.
2009-11-12 01:20:19 +00:00
david
a8821f3cf4 Add the NSE function nmap.bind, which sets the source address of a
socket.
2009-10-11 23:08:43 +00:00
batrick
afa84d2320 [NSE] Added the reconnect_ssl method for sockets. We sometimes need
to reconnect a socket with SSL because the initial communication on the socket
is done without SSL. See this thread [1] for more details.

[1] http://seclists.org/nmap-dev/2009/q4/3
2009-10-06 13:02:12 +00:00
david
361f10fc90 Update NSEDoc to say that nmap.get_port_state can return nil if you pass
it a port that was not scanned.
2009-09-29 14:58:44 +00:00
david
8ba33e607b Make it clear in the NSEDoc that error values can be any false value:
<code>false</code> or <code>nil</code>. Basically it's anything that
matches the protocol of an nmap.new_try handler.
2009-09-14 15:56:49 +00:00
david
6c766c58cd Add the nmap.get_ssl_certificate NSE function, which returns the peer
certificate of an SSL socket.
2009-08-13 23:32:33 +00:00
david
276a2f195c [NSE] Scripts that are listed by name with the --script option now
have their verbosity level automatically increased by one. Many
will print negative results ("no infection found") at a higher
verbosity level. The idea is that if you ask for a script
specifically, you are more interested in such results.
2009-07-12 19:35:56 +00:00
batrick
3016193c11 Improvements to the nmap library. See [1] for discussion and a full listing of
the changes.

[1] http://seclists.org/nmap-dev/2008/q4/0663.html
2008-12-29 21:59:08 +00:00
david
9b82189c39 Make the documentation for nmap.new_try more clear on a suggestion by Patrick. 2008-12-29 04:08:43 +00:00
batrick
f08596bf49 Fixed a misspelling. 2008-12-09 01:37:10 +00:00
david
041e39f88a Fix a typo in nmap.luadoc. 2008-11-20 17:27:05 +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
854b3460b5 Fix an inaccuracy in the documentation for the nmap.receive_lines and
nmap.receive_bytes functions. It claimed that if you don't get all the
lines/bytes you request before a timeout, then a "TIMEOUT" error happens. In
reality you get back data as long as at least one byte was received before the
timeout. From nsock_readlines:

/* Read up to nlines lines (terminated with \n, which of course
   inclues \r\n), or until EOF, or until the timeout, whichever comes
   first.  Note that NSE_STATUS_SUCCESS will be returned in the case
   of EOF or tiemout if at least 1 char has been read.  Also note that
   you may get more than 'nlines' back -- we just stop once "at least"
   'nlines' is read */
2008-11-04 22:39:07 +00:00
david
d0e545b49c Proofread and update documentation of nmap, openssl, packet, and pcre. 2008-10-24 19:08:27 +00:00
david
3ee17ecb5c Fix NSEDoc error messages, except for some "documenting undefined parameter"
that happen when one function is defined to be another by assignment.
2008-10-24 17:05:40 +00:00
david
a2ca60092c Remove module and object prefixes from function names in .luadoc files, as
suggested by jah in http://seclists.org/nmap-dev/2008/q4/0232.html. This makes
@see cross-references to functions in these files work from other modules.
2008-10-24 15:57:11 +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
david
20137202d9 Change nmap.luadoc to use Unix line endings. 2008-10-21 22:35:10 +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
batrick
05c7d791cd Added nmap luadoc documentation file. 2008-08-16 00:28:28 +00:00