1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 14:11:29 +00:00
Commit Graph

16 Commits

Author SHA1 Message Date
dmiller
0500811f5a Move string utility functions to stringaux.lua 2018-10-18 01:08:19 +00:00
dmiller
0cfdf2a372 Improved debugging/output for NFS scripts 2018-09-05 20:34:19 +00:00
dmiller
f4619edece Update http urls for nmap.org to https 2015-11-05 20:41:05 +00:00
dmiller
10dce0382c Clean up string concatenations
Building a string with var = var .. "something" has miserable time
complexities. This commit cleans up a lot of that in scripts, focusing
on packing of data with bin.pack and concatenations within loops.
Additionally, a few instances were replaced with string.rep
2015-02-25 19:58:42 +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
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
45cd8091a4 Fix Lua patterns that contain -
"-" in a Lua pattern means "ungreedy zero-or-more" and must be escaped
to match a literal "-". http://www.lua.org/manual/5.2/manual.html#6.4.1
2013-12-19 20:05:09 +00:00
patrik
a18d0b2ff0 nse_check_globals cleanup 2012-08-18 07:10:27 +00:00
dmiller
a329909fdf Update nfs-{showmount,statfs} to new rpc-grind 2012-08-18 04:07:11 +00:00
patrik
217b27bace nse_check_globals cleanup 2012-07-24 10:08:43 +00:00
david
360ba052e9 AUTH_UNIX support for rpc.lua.
http://seclists.org/nmap-dev/2012/q2/54

This patch is from Daniel Miller. He writes:

I've just finished enhancing the nfs-ls, nfs-statfs, and nfs-showmount
scripts so that they can run based on version detection information,
for cases where the portmapper is firewalled. For nfs-ls and
nfs-statfs, this required making a hostrule to check that both a
mountd service and a nfs service were detected. In the process, I
ended up adding the AUTH_UNIX flavor to rpc.lua, since the RFC states
that AUTH_NULL can only be used for the NULL procedure (and my Linux
nfs-kernel-server was enforcing that).

Other minor changes:

* If running privileged, attempt to bind to a reserved port. Many NFS
servers refuse to talk to source ports >1024, as a "security measure"
* handle an odd case in nfs-ls where READDIRPLUS does not return file
attributes. Chose to use all ?'s, but in the future maybe a direct
GETATTR call?
* remove reference to nfs.dirlist argument from nfs-ls doc, since it is unused
2012-06-20 02:12:58 +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
djalal
9849be68a9 Use the new get_script_args() function to parse script arguments and clean some whitespaces. 2010-08-17 01:58:47 +00:00
patrik
71ca5cceba o [NSE] Improved error handling and reporting and re-designed communication
class in RPC library with patch from Djalal Harouni. [Patrik]
2010-04-22 20:25:38 +00:00
patrik
dd9a237fe2 o [NSE] Added RPC library and three new NFS scripts. Modified the rpcinfo and
nfs-showmount scripts to use the new library. The new scripts are:
  - nfs-acls shows the owner and directory mode of NFS exports
  - nfs-dirlist lists the contents of NFS exports
  - nfs-statfs shows file system statistics for NFS exports
  [Patrik]
2010-03-21 17:56:17 +00:00
david
971a11f3fe Add the nfs-showmount script by Patrik Karlsson. 2009-11-26 16:52:30 +00:00