1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-08 21:51:28 +00:00
Commit Graph

35 Commits

Author SHA1 Message Date
dmiller
6fb2172ca2 Fix script crash: can't pack binary data as zero-terminated if it contains zeros. 2020-02-05 04:30:56 +00:00
dmiller
0b9bcba19b Remove bin.lua packing from more scripts 2018-09-05 21:57:41 +00:00
nnposter
5fa53d064a Corrects a unit-of-measure mismatch between the desired packet delay and
an observed roundtrip time. Closes #1038, closes #1037.
2017-10-24 17:21:22 +00:00
dmiller
0e7f11673c Change more bin lib to string packing/fromhex. Closes #755. Closes #769 2017-03-25 13:39:44 +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
204d37e4d7 Replace packet.toip* and ip*tobin with ipOps.ip_to_str and str_to_ip 2015-02-27 19:42:46 +00:00
batrick
a19c9eb461 stdnse.print_verbose -> stdnse.verbose1
$ sed -i 's/stdnse.print_verbose( *\([0-9]*\) *, *" *%s *:* *\([^"]*\)" *, *SCRIPT_NAME/stdnse.verbose\1("\2"/' *.nse
$ sed -i 's/stdnse.print_verbose( *" *%s *:* *\([^"]*\)" *, *SCRIPT_NAME/stdnse.verbose1("\1"/' *.nse

and some manual corrections.
2014-08-02 18:32:26 +00:00
batrick
2a8c81c4f6 stdnse.print_debug -> stdnse.debug1
$ sed -i 's/stdnse.print_debug("%s \([^"]*\)", SCRIPT_NAME/stdnse.debug1("\1"/' *.nse
2014-08-01 21:35:56 +00:00
dmiller
31a2c432e1 Final re-indent for scripts. 2014-02-02 15:33:39 +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
david
874bbe28cd Pass the dst argument to existing calls to nmap.ip_send. 2012-09-15 17:56:21 +00:00
perdo
5ac6c7d64a Fixed errors found by nse_check_globals. 2012-06-06 22:23: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
b2d1ac7580 Avoid bloating the registry by using variables to transfer information from
the hostrule to the action function.
2011-06-20 21:06:14 +00:00
kris
eb7202d45c fix whitespace inconsistencies from copy-and-pastes 2011-05-06 23:48:41 +00:00
batrick
7f66646636 Patch to make require errors silent and removed evil workarounds.
Added new stdnse function stdnse.print_verbose (similar to print_debug).
2011-05-04 21:06:53 +00:00
david
ec4db04494 Add checks for nmap.address_family == "inet" to scripts that require
that. Patch by Henri Doreau.
2011-04-19 18:09:15 +00:00
david
46c29d3f60 Use stdnse.print_debug instead of log_write. Patch by Henri Doreau. 2011-04-19 18:09:13 +00:00
david
a9a5869173 Normalize tab.lua usage so that a call to tab.nextrow comes after (not
before) each group of tab.add, and there is no tab.nextrow before or
after tab.addrow. Also remove manual indenting that was accomplished by
padding the first column with spaces; this is done by
stdnse.format_output now.
2010-12-30 21:08:25 +00:00
david
357c15a165 Remove the "cols" parameter from calls to tab.new. 2010-12-30 21:08:18 +00:00
batrick
ca56c00d33 removed some unnecessary locals 2010-11-05 14:25:44 +00:00
david
e7fc9c4c5f Change " \n" to just "\n" where appropriate in NSE. Leading newlines are
no longer removed from script output.
2010-09-30 05:03:39 +00:00
kris
fa858e041b Remove unused and newly unrequired arguments to the pcap check functions (which
replace the old callbacks) in scripts
2010-09-19 02:15:19 +00:00
batrick
de4ba536de Merge from /nmap-exp/patrick/nse-nsock-maintenance.
This is a maintenance fix for the NSE Nsock library binding. The patch focuses
on code correctness and simplicity. The patch also brings some initial updates
with an eye towards the upcoming Lua 5.2 release. See [1] for a post concerning
this branch.

[1] http://seclists.org/nmap-dev/2010/q3/710
2010-09-18 20:35:09 +00:00
david
1290fad780 o [NSE] Added default limits on the number of ports that qscan will
scan. By default, it will do upt o 8 open ports and up to 1 closed
  port. These limits can be controlled with the qscan.numopen and
  qscan.numclosed script arguments. [David]
2010-08-13 05:17:07 +00:00
kris
412fcbcca0 o [NSE] Added a "times" table to the host table passed to scripts.
This table contains Nmap's timing data (srtt, the smoothed round
  trip time; rttvar, the rtt variance; and timeout), all represented
  as floating-point seconds.  The ipidseq and qscan scripts were
  updated to utilize the host's timeout value instead of the very
  conservative guess of 3 seconds for read timeouts. [Kris]
2010-08-05 01:55:05 +00:00
fyodor
027f095b4f Remove Kris's email address from two scripts to match what he uses in the other three (If he wants the email addresses, he is welcome to put them on all five--I'm just doing a little cleanup for consistency 2010-07-24 05:32:18 +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
1ff1a4f892 First-pass copyediting on the remaining scripts. 2010-07-12 17:19:26 +00:00
kris
3a0aa06db1 Fix a bug in qscan.nse which kept a confidence level of 0.9995 from working;
Marcin Hoffmann reported the problem.
2010-06-05 00:46:48 +00:00
david
a6e014d42e Change these script arguments to use stdnse.parse_timespec:
qscan.delay
dns-fuzz.timelimit
mssql.timelimit
A side effect is that the default units for qscan.delay are seconds, not
milliseconds. 0 is now the magic value to disable the time limit in
dns-fuzz.
2010-04-13 23:09:23 +00:00
david
5fa554266b Fix NSEDoc. 2010-03-31 20:28:14 +00:00
kris
918a1bb909 o [NSE] Added the qscan script to repeatedly probe ports on a host to
gather round-trip times for each port.  The script then uses these
  times to group together ports with statistically equivalent RTTs.
  Ports in different groups could be the result of things such as port
  forwarding to hosts behind a NAT.  This is based on work by Doug
  Hoyte. [Kris]
2010-03-21 20:05:31 +00:00