1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 13:11:28 +00:00
Commit Graph

27 Commits

Author SHA1 Message Date
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
4d106cbe23 Remove unneeded requires 2015-02-28 12:43:59 +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
dmiller
dd40ba14ea Remove data packing atrocities from broadcast-ping.nse
Use of the "H" bin.unpack template should be discouraged, since it leads
to use of blobs of hex data without dissection. NSE scripts should be
self-documenting with regard to packet contents. Similarly, chaining
bin.pack and bin.unpack is usually an anti-pattern for some simpler
construct. In this case, converting a number to hex, padding it with
"0", and packing it is unnecessary, since the original number can be
packed directly with the proper endianness and width.
2015-02-10 04:49:28 +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
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
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
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
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
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
dmiller
8d28811522 Update scripts with millisecond timeouts to timespec
Similar changes to r30653, but may break compatibility with people using
integer millisecond values, which are now treated as number of seconds.
To get same behavior, use ms after number, e.g. 5000 becomes 5000ms or
5s
2013-03-06 15:14:20 +00:00
dmiller
fdb0f775e2 Update timeout script-args to use standard timespec
Many scripts were documented as using timespecs (10s, 5000ms, etc) for
timeout script-args, but one 1 or 2 actually did. Now all timeout
script-args will accept timespecs, except those which took a number of
milliseconds, which remain unchanged.

Also fixed some documentation issues (missing script name in arg
description, missing nsedoc for args, etc)
2013-03-05 21:34:25 +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
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
david
515dbe7f2f Use stdnse.silent_require where needed.
This is required for scripts that require "openssl", but also
transitively for script that require a library that requires "openssl".
2012-03-09 18:06:49 +00:00
tomsellers
78b99eec3c Removed svn:execute property from certain .NSE scripts. This was enabling the execute bit on files when they were checked out. 2012-02-08 04:11:10 +00:00
david
bc6468b246 Be more explicit about how to enable newtargets. 2011-10-07 07:51:51 +00:00
david
cf2d0b5e5c Use tab instead of manually counting spaces. 2011-10-07 07:51:50 +00:00
david
187252bc59 Rewrite some duplicated loops. 2011-10-07 07:51:50 +00:00
fyodor
bff90f3d55 minor updates to the nsedoc descriptions for some scripts 2011-09-11 18:26:37 +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
gorjan
f46a8eb2de Output fix 2011-08-22 13:48:44 +00:00
gorjan
b9a1f0d49e Small fix for script output not to include the newtargets comment when no output is produced. 2011-08-02 03:45:59 +00:00
gorjan
9b7d310355 Adding the broadcast-ping script. 2011-07-13 09:38:40 +00:00