diff --git a/nselib/brute.lua b/nselib/brute.lua index e8b154902..bba763e97 100644 --- a/nselib/brute.lua +++ b/nselib/brute.lua @@ -357,8 +357,8 @@ Options = { return (val == "true" or val == true or tonumber(val) == 1) end, - --- Sets the brute mode to either iterate over users or passwords - -- @see description for more information. + --- Sets the brute mode to either iterate over users or passwords. + -- See description for more information. -- -- @param mode string containing either "user" or "password" -- @return status true on success else false diff --git a/nselib/ftp.lua b/nselib/ftp.lua index fc4d0519d..b9289122e 100644 --- a/nselib/ftp.lua +++ b/nselib/ftp.lua @@ -26,7 +26,7 @@ local crlf_pattern = "\r?\n" -- @return code The numeric response code, as returned by read_reply, or error message if socket is nil. -- @return message The response message -- @return buffer The socket read buffer function, to be passed to read_reply. --- @see comm.lua +-- @see comm connect = function(host, port, opts) opts = opts or {} opts.recv_before = true diff --git a/nselib/libssh2.luadoc b/nselib/libssh2.luadoc index 20faddbb5..45a773ce7 100644 --- a/nselib/libssh2.luadoc +++ b/nselib/libssh2.luadoc @@ -72,7 +72,7 @@ function publickey_canauth(session, username, publickeydata) -- @param session Authenticated libssh2 session -- @param no_pty If true, skip requesting a PTY. -- @return libssh2 channel -function open_channel(session, pty) +function open_channel(session, no_pty) --- Reads data from stdin on libssh2 channel. -- @param session Authenticated libssh2 session diff --git a/nselib/sip.lua b/nselib/sip.lua index 243dc6228..31e4ba502 100644 --- a/nselib/sip.lua +++ b/nselib/sip.lua @@ -267,7 +267,7 @@ Session = { --- Prepares and sends the challenge response authentication to the server -- @name Session.authenticate -- @param request instance of the request object requiring authentication - -- @param authdata string containing authentication data + -- @param response string containing authentication data -- @return status true on success false on failure -- @return err string containing an error message if status is false authenticate = function(self, request, response) @@ -582,7 +582,7 @@ Request = { --- Sets the request content data -- @name Request.setContent - -- @param string containing the content data + -- @param content string containing the content data setContent = function(self, content) self.content = content end, --- Sets the requests' content type diff --git a/nselib/slaxml.lua b/nselib/slaxml.lua index f4ea7f35f..f5112efea 100644 --- a/nselib/slaxml.lua +++ b/nselib/slaxml.lua @@ -192,7 +192,7 @@ parser = { unescape = function(str) return string.gsub( str, '(&(#?)([%d%a]+);)', entitySwap ) end, --- Parses the xml in sax like manner. - -- @self The parser object. + -- @param self The parser object. -- @param xml The xml body to be parsed. -- @param options Options if any specified. parseSAX = function(self, xml, options) diff --git a/nselib/smb.lua b/nselib/smb.lua index 9657767ef..fcf0b1d35 100644 --- a/nselib/smb.lua +++ b/nselib/smb.lua @@ -458,7 +458,7 @@ function start_raw(host, port) return true, socket end ---- This function will take a string like "a.b.c.d" and return "a", "a.b", "a.b.c", and "a.b.c.d". +-- This function will take a string like "a.b.c.d" and return "a", "a.b", "a.b.c", and "a.b.c.d". -- -- This is used for discovering NetBIOS names. If a NetBIOS name is unknown, the substrings of the -- DNS name can be used in this way. @@ -687,7 +687,7 @@ function smb_encode_header(smb, command, overrides) return header end ---- Converts a string containing the parameters section into the encoded +-- Converts a string containing the parameters section into the encoded -- parameters string. -- -- The encoding is simple: @@ -705,7 +705,7 @@ local function smb_encode_parameters(parameters, overrides) return string.pack("message_sign, and works the same way -- (replaces the signature with the sequence number, calculates hash, checks) @@ -2142,7 +2142,7 @@ function delete_file(smb, path, overrides) return true end ---- +-- -- Implements SMB_COM_TRANSACTION2 to support the find_files function -- This function has not been extensively tested -- diff --git a/nselib/smbauth.lua b/nselib/smbauth.lua index 6fe547a74..b2cadcc41 100644 --- a/nselib/smbauth.lua +++ b/nselib/smbauth.lua @@ -322,7 +322,7 @@ function init_account(host) end end ----Generate the Lanman v1 hash (LMv1). +--Generate the Lanman v1 hash (LMv1). -- -- The generated hash is incredibly easy to reverse, because the input is -- padded or truncated to 14 characters, then split into two 7-character @@ -628,7 +628,7 @@ end -- be generated properly). --@return lm_response, to be send directly back to the server --@return ntlm_response, to be send directly back to the server ---@reutrn mac_key used for message signing. +--@return mac_key used for message signing. function get_password_response(ip, username, domain, password, password_hash, hash_type, challenge, is_extended) local status local lm_hash = nil diff --git a/nselib/snmp.lua b/nselib/snmp.lua index e28a30a3c..fca1a2636 100644 --- a/nselib/snmp.lua +++ b/nselib/snmp.lua @@ -151,7 +151,7 @@ end local version_to_num = {v1=0, v2c=1} local num_to_version = {[0]="v1", [1]="v2c"} ---- Returns the numerical value of a given SNMP protocol version +-- Returns the numerical value of a given SNMP protocol version -- -- Numerical input is simply passed through, assuming it is valid. -- String input is translated to its corresponding numerical value. @@ -549,7 +549,7 @@ Helper = { -- @param options SNMP options table -- @see snmp.options -- @param oid Object identifiers of object to be set. - -- @param value To which value object should be set. If given a table, + -- @param setparam To which value object should be set. If given a table, -- use the table instead of OID/value pair. -- @return status False if error, true otherwise -- @return Table with all decoded responses and their OIDs. diff --git a/nselib/stdnse.lua b/nselib/stdnse.lua index a83bded83..24bb9dfca 100644 --- a/nselib/stdnse.lua +++ b/nselib/stdnse.lua @@ -643,7 +643,7 @@ end -- => mode = "timed" -- => domains = {"host1","host2"} -- --- @param Arguments Script arguments to check. +-- @param ... Script arguments to check. -- @return Arguments values. function get_script_args (...) local args = {} diff --git a/nselib/stringaux.lua b/nselib/stringaux.lua index 96417b19c..19059b5ec 100644 --- a/nselib/stringaux.lua +++ b/nselib/stringaux.lua @@ -41,14 +41,13 @@ end --- Split a string at a given delimiter, which may be a pattern. -- --- If you want to loop over the resulting values, consider using string.gmatch instead. +-- If you want to loop over the resulting values, consider using string.gmatch instead. -- @usage -- stringaux.strsplit(",%s*", "Anna, Bob, Charlie, Dolores") -- --> { "Anna", "Bob", "Charlie", "Dolores" } -- @param pattern Pattern that separates the desired strings. -- @param text String to split. -- @return Array of substrings without the separating pattern. --- @see string.gmatch function strsplit(pattern, text) local list, pos = {}, 1; diff --git a/nselib/tableaux.lua b/nselib/tableaux.lua index ae54e8921..670a76299 100644 --- a/nselib/tableaux.lua +++ b/nselib/tableaux.lua @@ -62,7 +62,7 @@ end --- Check for the presence of a value in a table --@param t the table to search into --@param item the searched value ---@array (optional) If true, then use ipairs to only search the array indices of the table. +--@param array (optional) If true, then use ipairs to only search the array indices of the table. --@return Boolean true if the item was found, false if not --@return The index or key where the value was found, or nil function contains(t, item, array) diff --git a/nselib/target.lua b/nselib/target.lua index 46e4df2d7..d83271e99 100644 --- a/nselib/target.lua +++ b/nselib/target.lua @@ -60,7 +60,7 @@ end -- -- Only prerule, portrule and hostrule scripts can add new targets. -- --- @param targets A variable number of targets. Target is a +-- @param ... A variable number of targets. Target is a -- string that represents an IP or a Hostname. If this function -- is called without target arguments then it will return true -- and the number of pending targets (waiting to be scanned). diff --git a/nselib/tn3270.lua b/nselib/tn3270.lua index d49f4da30..34cefc13d 100644 --- a/nselib/tn3270.lua +++ b/nselib/tn3270.lua @@ -324,8 +324,8 @@ Telnet = { -- Buffer addresses can come in 14 or 12 (this terminal doesn't support 16 bit) -- this function takes two bytes (buffer addresses are two bytes long) and returns -- the decoded buffer address. - -- @param1 unsigned char, first byte of buffer address. - -- @param2 unsigned char, second byte of buffer address. + -- @param unsigned char, first byte of buffer address. + -- @param unsigned char, second byte of buffer address. -- @return integer of buffer address DECODE_BADDR = function ( byte1, byte2 ) if (byte1 & 0xC0) == 0 then @@ -339,7 +339,7 @@ Telnet = { --- Encode Buffer Address -- - -- @param integer buffer address + -- @param address integer buffer address -- @return TN3270 encoded buffer address (12 bit) as string ENCODE_BADDR = function ( self, address ) stdnse.debug(3, "Encoding Address: %s", address) @@ -842,7 +842,7 @@ Telnet = { --- WCC / tn3270 data stream processor -- - -- @param tn3270 data stream + -- @param data tn3270 data stream -- @return status true on success, false on failure -- @return changes self.buffer to match requested changes process_write = function ( self, data ) @@ -1065,7 +1065,7 @@ Telnet = { --- Sends TN3270 Packet -- -- Expands IAC to IAC IAC and finally appends IAC EOR - -- @param data: table containing buffer array + -- @param data table containing buffer array send_tn3270 = function ( self, data ) local packet = '' if self.state == self.TN3270E_DATA then @@ -1164,8 +1164,8 @@ Telnet = { --- Sends the data to the location specified -- -- Using a location on the screen sends the data - -- @param location: a location on the screen (between 0 and 1920) - -- @param data: ascii data to send to that location + -- @param location a location on the screen (between 0 and 1920) + -- @param data ascii data to send to that location send_location = function( self, location, data ) local cursor_location = location + #data local ebcdic_letter = '' @@ -1191,7 +1191,7 @@ Telnet = { -- -- Using a supplied tuple of location and data generates tn3270 data to -- fill out the screen - -- @param location_tuple: and array of tuples with location and data. For + -- @param location_tuple and array of tuples with location and data. For -- example: send_locations([{579:"dade"},{630:"secret"}]) send_locations = function( self, location_tuple ) local cursor_location = location_tuple[#location_tuple][1] + #location_tuple[#location_tuple][2] @@ -1303,7 +1303,7 @@ Telnet = { --- Any Hidden Fields -- - -- @returns true if there are any hidden fields in the buffer + -- @return true if there are any hidden fields in the buffer any_hidden = function ( self ) local hidden_attrib = 0x0c -- 00001100 is hidden for i = 0,#self.fa_buffer do @@ -1315,7 +1315,7 @@ Telnet = { --- Hidden Fields -- - -- @returns the locations of hidden fields in a table with each pair being the start and stop of the hidden field + -- @return the locations of hidden fields in a table with each pair being the start and stop of the hidden field hidden_fields_location = function ( self ) local hidden_attrib = 0x0c -- 00001100 is hidden local hidden_location = {} diff --git a/nselib/tns.lua b/nselib/tns.lua index 1d7b953c9..ae51c6c47 100644 --- a/nselib/tns.lua +++ b/nselib/tns.lua @@ -672,7 +672,7 @@ Packet.Unknown1 = { --- Creates a new Packet.Unknown1 -- - -- @param version containing the version of the packet to send + -- @param os string containing the version of the packet to send -- @return new instance of Packet.Unknown1 new = function(self, os) local o = { os = os } @@ -1690,7 +1690,7 @@ Helper = { --- Authenticates to the database -- -- @param user containing the Oracle user name - -- @param pass containing the Oracle user password + -- @param password containing the Oracle user password -- @return true on success, false on failure -- @return err containing error message when status is false Login = function( self, user, password ) @@ -1720,7 +1720,7 @@ Helper = { --- Steal auth data from database -- @param user containing the Oracle user name - -- @param pass containing the Oracle user password + -- @param password containing the Oracle user password -- @return true on success, false on failure -- @return err containing error message when status is false StealthLogin = function( self, user, password ) diff --git a/nselib/unicode.lua b/nselib/unicode.lua index 284b6e943..466207616 100644 --- a/nselib/unicode.lua +++ b/nselib/unicode.lua @@ -235,6 +235,8 @@ end -- @class function --@param cp The Unicode code point as a number --@return A string containing the code point in UTF-8 encoding. +--@class function +--@name utf8_enc utf8_enc = utf8.char ---Decodes a UTF-8 character. diff --git a/nselib/xmpp.lua b/nselib/xmpp.lua index a319c2d2f..f12327fbb 100644 --- a/nselib/xmpp.lua +++ b/nselib/xmpp.lua @@ -427,7 +427,7 @@ Helper = { -- @param username string -- @param password string -- @param mech string containing a supported authentication mechanism - -- @see Helper.getAuthMechs + -- @see XMPP.getAuthMechs -- @return status true on success, false on failure -- @return err string containing error message if status is false login = function(self, username, password, mech) diff --git a/scripts/weblogic-t3-info.nse b/scripts/weblogic-t3-info.nse index f630dc0b9..485d2e60d 100644 --- a/scripts/weblogic-t3-info.nse +++ b/scripts/weblogic-t3-info.nse @@ -8,6 +8,9 @@ author = {"Alessandro ZANNI ", "Daniel Miller"} license = "Same as Nmap--See https://nmap.org/book/man-legal.html" categories = {"default","safe","discovery","version"} +---@output +--|_weblogic-t3-info: T3 protocol in use (WebLogic version: 12.1.2) + portrule = function(host, port) if type(port.version) == "table" and port.version.name_confidence > 3 and port.version.product ~= nil then return string.find(port.version.product, "WebLogic", 1, true) and nmap.version_intensity() >= 7