1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-25 17:09:02 +00:00
Commit Graph

30 Commits

Author SHA1 Message Date
dmiller
47cbe50afb Add cross references between the 2 whois scripts 2020-08-08 15:19:14 +00:00
dmiller
d341c45cf4 Fix io.close calls in whois-ip 2020-02-04 18:57:02 +00:00
dmiller
0500811f5a Move string utility functions to stringaux.lua 2018-10-18 01:08:19 +00:00
nnposter
57a17415b7 more efficient match, avoiding strings 2018-08-18 01:00:16 +00:00
nnposter
a4237019ac Fixes indentation 2018-08-05 21:30:42 +00:00
nnposter
1e1f7c80c2 Simplifies code; possibly ipOps candidate 2018-08-05 21:29:37 +00:00
dmiller
02e3add66e Fix type comparisons to library names. Closes #1158 2018-03-28 20:17:43 +00:00
batrick
7f5ec526fe Merge branch 'nse-lua53'
Lua 5.3 adds several awesome features of particular interest to nmap including
bitwise operators and integers, a utf8 library, and standard binary pack/unpack
functions.

In addition to adding Lua 5.3, this branch changes:

o Complete removal of the NSE bit library (in C), It has been replaced with
  a new Lua library wrapping Lua 5.3's bit-wise operators.

o Complete removal of the NSE bin library (in C). It has been replaced with a
  new Lua library wrapping Lua 5.3's string.pack|unpack functions.

o The bin.pack "B" format specifier (which has never worked correctly) is
  unimplemented.  All scripts/libraries which use it have been updated. Most
  usage of this option was to allow string based bit-wise operations which are no
  longer necessary now that Lua 5.3 provides integers and bit-wise operators.

o The base32/base64 libraries have been reimplemented using Lua 5.3's new
  bitwise operators. (This library was the main user of the bin.pack "B" format
  specifier.)

o A new "bits" library has been added for common bit hacks. Currently only has
  a reverse function.

Thanks to David Fifield, Daniel Miller, Jacek Wielemborek, and  Paulino
Calderon for testing this branch.
2016-07-02 17:02:27 +00:00
jah
3da6feda13 Treat stale, unwritable files as unreadable. 2016-02-07 15:28:26 +00:00
jah
a40fe5413c Handle file io error messages on Windows
which prepends the file path to the error string.
2016-02-07 15:11:24 +00:00
jah
a9e7f696b9 Improve handling of locally cached assignment data
so that whois-ip will not make HTTP requests to iana.org unless it is
permitted to write the remote resources to a local file and to
subsequently read from the local file.
2016-02-07 14:10:09 +00:00
jah
a50e8cfa21 Seperate addr family check for assignment file use
A problem encountered while obtaining or locally caching a remote IANA
assignment file for one address family will not prevent the use of an
assignment file corresponding to a different address family.
2016-02-07 14:08:44 +00:00
jah
b7e597ed8f Various non-functional improvements
such as white space corrections, removal of redundant function arguments
and cetera.
2016-02-07 14:07:57 +00:00
dmiller
f4619edece Update http urls for nmap.org to https 2015-11-05 20:41:05 +00:00
dmiller
564f654747 Fix leftovers from the whois => whois-ip name change 2015-03-07 04:24:31 +00:00
jah
836c6e25bc Remove target IP address from debug messages in whois-ip.nse
stdnse.debug writes the IP to messages so scripts don't have to.
A couple of functions no longer needed the target IP passed to them: their
signature and nsedoc were updated accordingly, along with any calls to them.
Also fix some white space.
2015-02-20 03:34:57 +00:00
jah
859ae15b9f Obtain whois remote assignments files over https. 2015-02-10 17:30:22 +00:00
jah
a26b28b635 Improve script output by removal of the empty line which follows two fields on
the same line.
2015-02-10 17:26:12 +00:00
batrick
6e3bde5de5 debug6 -> debug5 2014-08-02 02:56:31 +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
d47acf9f5e more stdnse.print_debug -> stdnse.debug
$ sed -i 's/stdnse.print_debug( *\([0-9]*\) *, *" *%s *:* *\([^"]*\)" *, *SCRIPT_NAME/stdnse.debug\1("\2"/' *.nse
$ sed -i 's/stdnse.print_debug( *" *%s *:* *\([^"]*\)" *, *SCRIPT_NAME/stdnse.debug1("\1"/' *.nse
2014-08-02 02:08:12 +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
jah
c4fc2529a8 Update the way queries to ARIN are formed: from "+ <IP>" to "n + <IP>".
Update CHANGELOG with recent improvements to whois-ip.nse.
2014-04-21 14:20:36 +00:00
jah
338dca4cff Add a pattern for a "no match found" type of response from LACNIC. 2014-04-21 14:03:57 +00:00
jah
c47fff6fc2 Fix a problem which happens when a referred-to response cannot be understood, causing an unhandled error. 2014-04-21 13:59:46 +00:00
jah
0623907188 Fix some indentation which went awry in r32677 and r32704 and some which has always been less than ideal. 2014-04-21 13:22:12 +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
fb67a6717e Re-indent some libs and scripts, change 4 to 2-space indent
Mostly found with:

    for i in nselib/*.lua scripts/*.nse; do
      echo $(perl -lne 'BEGIN{$a=$p=0}next unless $_;/^(\s*)/;' \
        -e '$l=length$1;next if$l==$p;$a+=(abs($l-$p)-$a)/$.;' \
        -e '$p=$l;END{print$a}' $i) $i
    done | sort -nr

And indented with: https://gist.github.com/bonsaiviking/8845871

whois-ip.nse was particularly mangled (probably my fault due to using
vim's built-in indentation script, but it could be structured better)
2014-02-06 23:25:28 +00:00
dmiller
1d9fa6bea2 Fix some bugs in sstp-discover reported on IRC 2014-01-27 19:13:22 +00:00
sophron
1f6467d8b6 [NSE] Added whois-domain.nse and renamed whois.nse to whois-ip.nse 2013-07-25 00:57:28 +00:00