diff --git a/nselib/snmp.lua b/nselib/snmp.lua
index 4244c4dbb..672232781 100644
--- a/nselib/snmp.lua
+++ b/nselib/snmp.lua
@@ -1,4 +1,7 @@
--- SNMP functions.
+--
+-- @args snmpcommunity The community string to use. If not given, it is
+-- "public", or whatever is passed to buildPacket.
-- @copyright Same as Nmap--See http://nmap.org/book/man-legal.html
@@ -291,7 +294,7 @@ end
-- @param PDU SNMP Protocol Data Unit to be encapsulated in the packet.
-- @param version SNMP version, default 0 (SNMP V1).
-- @param commStr community string, if not already supplied in registry or as
--- the snmpcommunity script argument.
+-- the snmpcommunity script argument.
function buildPacket(PDU, version, commStr)
local comm = nmap.registry.args.snmpcommunity
if (not comm) then comm = nmap.registry.snmpcommunity end
diff --git a/nselib/unpwdb.lua b/nselib/unpwdb.lua
index 873ff6aec..379898cc4 100644
--- a/nselib/unpwdb.lua
+++ b/nselib/unpwdb.lua
@@ -16,6 +16,8 @@
-- password in "mypass #!comment: blah" contain a space, two
-- spaces, or do they just separate the password from the comment?
--
+-- @args userdb The filename of an alternate username database.
+-- @args passdb The filename of an alternate password database.
-- @author Kris Katterjohn 06/2008
-- @copyright Same as Nmap--See http://nmap.org/book/man-legal.html
diff --git a/scripts/pop3-brute.nse b/scripts/pop3-brute.nse
index 5ad35cfeb..7118d334a 100644
--- a/scripts/pop3-brute.nse
+++ b/scripts/pop3-brute.nse
@@ -2,6 +2,13 @@ description = [[
Tries to log into a POP3 account by guessing usernames and passwords.
]]
+---
+-- @args pop3loginmethod The login method to use: "USER"
+-- (default), "SASL-PLAIN", "SASL-LOGIN",
+-- "SASL-CRAM-MD5", or "APOP".
+-- @args userdb The filename of an alternate username database.
+-- @args passdb The filename of an alternate password database.
+
author = "Philip Pickering "
license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
diff --git a/scripts/snmp-brute.nse b/scripts/snmp-brute.nse
index 6e67b44c6..e2fdbaab7 100644
--- a/scripts/snmp-brute.nse
+++ b/scripts/snmp-brute.nse
@@ -3,6 +3,13 @@ Attempts to find an SNMP community string by brute force guessing.
]]
-- 2008-07-03
+---
+-- @args snmpcommunity The SNMP community string to use. If supplied, this
+-- script will not run.
+-- @args snmplist The filename of a list of community strings to try.
+-- @args userdb The filename of an alternate username database.
+-- @args passdb The filename of an alternate password database.
+
author = "Philip Pickering "
license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
@@ -12,7 +19,7 @@ categories = {"intrusive", "auth"}
require "shortport"
require "snmp"
--- runs before SNMPsysdesr.nse
+-- runs before snmp-sysdescr.nse
runlevel = 1
portrule = shortport.portnumber(161, "udp", {"open", "open|filtered"})
diff --git a/scripts/snmp-sysdescr.nse b/scripts/snmp-sysdescr.nse
index 8da8cfe2a..d00fbcedf 100644
--- a/scripts/snmp-sysdescr.nse
+++ b/scripts/snmp-sysdescr.nse
@@ -3,6 +3,8 @@ Attempts to extract system information from an SNMP version 1 service.
]]
---
+-- @args snmpcommunity The community string to use.
+--
-- @output
-- | snmp-sysdescr: HP ETHERNET MULTI-ENVIRONMENT,ROM A.25.80,JETDIRECT,JD117,EEPROM V.28.22,CIDATE 08/09/2006
-- |_ System uptime: 28 days, 17:18:59 (248153900 timeticks)
@@ -16,7 +18,7 @@ categories = {"default", "discovery", "safe"}
require "shortport"
require "snmp"
--- runs after SNMPcommunityprobe.nse
+-- runs after snmp-brute.nse
runlevel = 2
portrule = shortport.portnumber(161, "udp", {"open", "open|filtered"})