1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

39 Commits

Author SHA1 Message Date
dmiller
a7e20158a8 Fix a crash in nbstat.nse; stdnse.output_table can't have setmetatable called on it this way. 2018-08-21 19:36:38 +00:00
dmiller
65f51df590 Better hex formatting functions for nbstat 2018-06-14 23:45:54 +00:00
dmiller
3248b7f539 Style changes to nbstat.nse 2018-06-14 23:40:09 +00:00
dmiller
39c1124acf Let nbstat work even if we can't parse nmap-mac-prefixes 2018-06-14 23:32:18 +00:00
dmiller
b624597e88 Also get workstation/redirector name in nbstat. Fixes #1239 2018-06-14 23:23:32 +00:00
dmiller
cb4b46bd53 Canonicalize authors as tables instead of comma-separated strings 2016-06-09 22:46:42 +00:00
dmiller
f4619edece Update http urls for nmap.org to https 2015-11-05 20:41:05 +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
3945c287e9 Update nbstat.nse to structured XML output 2013-10-17 21:57:48 +00:00
patrik
655f766445 reverted bad commits 2012-10-06 19:38:15 +00:00
patrik
2e5a448aa5 Revert "Squashed commit of the following:"
This reverts commit 71f5f22e79bdb44fffa14edd5d3ffa570efde8ed.
2012-10-06 19:25:04 +00:00
dmiller
346a495dd0 Squashed commit of the following:
commit 7c26e4de2ab365a30fe6e91f3a531eb38c8dfdba
Author: Daniel Miller <bonsaiviking@gmail.com>
Date:   Tue Aug 7 16:36:54 2012 -0500

    Fix indentation on netbios.lua (no code change)

commit 47dc3e32e6b47bd80620cfbc54e7590193dd0c1a
Author: Daniel Miller <bonsaiviking@gmail.com>
Date:   Tue Jul 31 16:42:27 2012 -0500

    Make smbauth.lua use host, not nmap, registry

commit 3738f8e6d551a1260463609d8cda86918843a372
Author: Daniel Miller <bonsaiviking@gmail.com>
Date:   Tue Jul 31 16:35:45 2012 -0500

    Make netbios.lua use host registry. Functions now can take host table or IP

commit 031cadb9d407ab7fd43aaddffda1a89c24cbdd45
Author: Daniel Miller <bonsaiviking@gmail.com>
Date:   Tue Jul 31 15:54:12 2012 -0500

    Remove mac-geolocation info from snmp-interfaces

commit 2218dbaf8ffd4a33de2bc028def9be7301dfb3a2
Author: Daniel Miller <bonsaiviking@gmail.com>
Date:   Tue Jul 31 15:52:36 2012 -0500

    Make path-mtu.nse use host, not nmap, registry

commit 5a3d006bdb9cd3e981a8e753c92b5ade5059a29b
Author: Daniel Miller <bonsaiviking@gmail.com>
Date:   Tue Jul 31 15:51:53 2012 -0500

    Make cvs-* scripts use host, not nmap, registry
2012-08-07 21:38:48 +00:00
dmiller
b868e7f3ce Move caching code to datafiles lib
Scripts no longer need to implement caching of datafiles tables in the
registry, since the datafiles.lua library keeps its own cache in the
registry. A side-effect is that scripts should not change the tables
returned by datafiles.parse_{protocols,rpc,services,mac_prefixes}(), as
doing so will affect all other scripts that use those functions.
2012-07-27 20:07:38 +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
patrik
523dbc609a o [NSE] Added the script duplicates which attempts to determine duplicate
hosts by analyzing information collected by other scripts. [Patrik Karlsson]
2012-03-12 22:24:58 +00:00
batrick
321e0d34e0 use # length operator instead of string.len (canonicalize)
Used this perl command:

$ # perl -pi -e 's/string\.len\((.*?)\)/#\1/g' *.nse
2011-05-11 15:12:47 +00:00
ron
b7a802bce8 Removed some more errant newlines from the output 2010-11-03 19:53:58 +00:00
ron
c5a111c5b9 Removed an errant '\n' that was causing blank lines 2010-11-03 19:50:25 +00:00
david
84a388aeb9 Give datafiles.lua the ability to parse nmap-mac-prefixes, and use it in
nbstat.nse to look up the MAC vendor string.
2010-02-26 00:27:30 +00:00
fyodor
77ab5c4305 Remove email addresses from scripts as discussed in this thread: http://seclists.org/nmap-dev/2009/q4/466 2009-11-24 08:49:02 +00:00
ron
08da8db7f0 Importing changes from my branch. There are two major updates:
1) I wrote a function that formats output from scripts in a consistent way. Although we haven't really come to a concensus on how it should look yet, it's easy to change when we do. 
2) New script: smb-enum-groups.nse. Enumerate the local groups on a system and their membership.
2009-11-20 16:05:06 +00:00
ron
45744eddc3 Merge in changes from my private branch, primarily smb-brute.nse and smb-pwdump.nse, among other smaller changes. 2009-03-05 02:03:29 +00:00
david
85deff9ede Use a more straightforward return style in script rules. Instead of
if cond then
		return true
	else
		return false
	end

just do

	return cond
2008-11-18 16:59:09 +00:00
david
a709967cdd Spell check script documentation. 2008-11-11 05:16:10 +00:00
fyodor
989f48be6d mostly documentation cleanup, though I also moved ftp-anon into the safe category since I don't think it is any more intrusive than other scripts in that category 2008-11-07 04:35:22 +00:00
david
4863d506c1 Remove script ids. Scripts are identified by file name in output (just the
basename without ".nse", or the full path with debugging level 2 or higher).
This includes documentation changes in scripting.xml.
2008-11-05 00:52:55 +00:00
david
12290c86cd Qualify some "I"s in script documentation to attribute them to their author, to
reduce confusion when many scripts are presented together. Also make a few
other miscellaneous documentation cleanups.
2008-11-04 16:41:12 +00:00
david
2cceb5184c Separate the first paragraph from the rest of the description with a blank
line, not "\n\n", in the SMB and MSRPC scripts and modules. There are newer
versions of these files pending review, so this is just a quick measure to let
me use first paragraphs as summaries rather than first sentences.
2008-11-03 16:17:07 +00:00
david
8bd71aaf43 Normalize NSEDoc documentation of scripts.
I made every script follow a standard form: it starts with the id, followed by
the description. The description is contained in [[ ]] delimiters. The
description is in the global description variable, not in a LuaDoc comment.
Other LuaDoc information such as @args and @usage follows the description in a
comment.

The first paragraph of each description is a a short summary of what the script
does. More detailed information, if any, is given in following paragraphs.

I also improved some wording and formatting in a few cases.
2008-10-14 20:52:50 +00:00
david
ae7455279e Add a new msrpc.lua module, plus new scripts smb-enumdomains.nse,
smb-enumshares.nse, and smb-enumusers.nse. Also enhance the netbios.lua and
smb.lua modules. Remove the smb-enum.nse script. All these changes are from Ron
Bowes.
2008-10-04 21:58:39 +00:00
david
9eff25bbc4 Add Ron Bowes's netbios and smb NSE modules and new scripts that use them. They
were introduced in http://seclists.org/nmap-dev/2008/q3/0827.html.
2008-09-15 17:58:38 +00:00
kris
a285f82299 o The NSE Comm library now defaults to trying to read as many bytes as are
available rather than lines if neither the "bytes" nor "lines" options are
  given.  Thanks to Brandon for reporting a problem which he noticed in the
  dns-test-open-recursion script. [Kris]
2008-07-28 01:47:26 +00:00
kris
2f9321360f o Added a new NSE Comm library for common network discovery tasks such
as banner-grabbing (get_banner()) and making a quick exchange of data
  (exchange()).  16 scripts were updated to use this library. [Kris]

I have *not* been able to test all of these scripts; however, I have
reviewed them and they should all work properly.  I would really like
some more testing, though :)

This commit includes scripting.xml documentation.
2008-06-12 14:32:25 +00:00
kris
c7eb8011d9 NSE now has a "default" category for scripts. This category holds the set
of scripts chosen from when using -sC (but it's still just another category
and so can be chosen with --script like any other).

On top of updating the docs with information about this new category, I've
also updated sections to emphasize that the "default" category, -sC and -A
are considered intrusive and should not be run against target networks
without permission.

The new list is very similar to the previous "safe,intrusive" list:

Added: finger, ircServerInfo, RealVNC_auth_bypass
Removed: HTTPpasswd

Here are the 21 scripts in this new category:

anonFTP
dns-test-open-recursion
finger
ftpbounce
HTTPAuth
HTTP_open_proxy
ircServerInfo
MSSQLm
MySQLinfo
nbstat
RealVNC_auth_bypass
robots
rpcinfo
showHTMLTitle
showOwner
SMTPcommands
SNMPsysdesr
SSHv1-support
SSLv2-support
UPnP-info
zoneTrans
2008-05-28 07:16:32 +00:00
fyodor
5b113453b3 reflect moved url 2008-04-09 09:55:03 +00:00
fyodor
60d1e103d3 Canonicalize license text--more than half did not even spell license correctly. They all still say that they are under Nmap's license, just with consistent capitalization and spelling, and now a link to Nmap legal page at http://nmap.org/man/man-legal.html 2008-04-07 08:23:21 +00:00
fyodor
00d6ad2920 add netbios name lookup script from Brandon Enright 2007-05-07 21:13:00 +00:00