mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 14:11:29 +00:00
Fix NSEDoc.
This commit is contained in:
@@ -392,7 +392,7 @@ Response = {
|
||||
|
||||
--- Sets the result
|
||||
--
|
||||
-- @param result
|
||||
-- @param result result to set
|
||||
setResult = function(self, result)
|
||||
self.result = result
|
||||
end,
|
||||
@@ -588,7 +588,6 @@ Proto = {
|
||||
--- Sends an GetStatus DSI request (which is basically a FPGetSrvrInfo
|
||||
-- AFP request) to the server and handles the response
|
||||
--
|
||||
-- @param socket already connected to the server
|
||||
-- @return status (true or false)
|
||||
-- @return table with server information (if status is true) or error string
|
||||
-- (if status is false)
|
||||
@@ -1449,7 +1448,7 @@ Helper = {
|
||||
|
||||
--- Reads a file on the AFP server
|
||||
--
|
||||
-- @param str_patch string containing the AFP sharepoint, path and filename eg. HR/Documents/File.doc
|
||||
-- @param str_path string containing the AFP sharepoint, path and filename eg. HR/Documents/File.doc
|
||||
-- @return status boolean true on success, false on failure
|
||||
-- @return content string containing the file contents
|
||||
ReadFile = function( self, str_path )
|
||||
@@ -1495,7 +1494,7 @@ Helper = {
|
||||
|
||||
--- Writes a file to the AFP server
|
||||
--
|
||||
-- @param str_patch string containing the AFP sharepoint, path and filename eg. HR/Documents/File.doc
|
||||
-- @param str_path string containing the AFP sharepoint, path and filename eg. HR/Documents/File.doc
|
||||
-- @param fdata string containing the data to write to the file
|
||||
-- @return status boolean true on success, false on failure
|
||||
-- @return error string containing error message if status is false
|
||||
|
||||
@@ -80,7 +80,7 @@ ASN1Decoder = {
|
||||
|
||||
--- Allows for registration of additional tag decoders
|
||||
--
|
||||
-- @param table containing decoding functions @see tagDecoders
|
||||
-- @param tagDecoders table containing decoding functions @see tagDecoders
|
||||
registerTagDecoders = function(self, tagDecoders)
|
||||
self:registerBaseDecoders()
|
||||
for k, v in pairs(tagDecoders) do
|
||||
@@ -293,7 +293,7 @@ ASN1Encoder = {
|
||||
|
||||
--- Allows for registration of additional tag encoders
|
||||
--
|
||||
-- @param table containing encoding functions @see tagEncoders
|
||||
-- @param tagEncoders table containing encoding functions @see tagEncoders
|
||||
registerTagEncoders = function(self, tagEncoders)
|
||||
self:registerBaseEncoders()
|
||||
for k, v in pairs(tagEncoders) do
|
||||
@@ -389,7 +389,7 @@ ASN1Encoder = {
|
||||
---
|
||||
-- Encodes the length part of a ASN.1 encoding triplet using the "primitive,
|
||||
-- definite-length" method.
|
||||
-- @param val Value to be encoded.
|
||||
-- @param len Length to be encoded.
|
||||
-- @return Encoded length value.
|
||||
encodeLength = function(len)
|
||||
if len < 128 then
|
||||
|
||||
@@ -23,7 +23,7 @@ module(... or "citrixxml",package.seeall)
|
||||
|
||||
--- Decodes html-entities to chars eg.   => <space>
|
||||
--
|
||||
-- @param str string to convert
|
||||
-- @param xmldata string to convert
|
||||
-- @return string an e
|
||||
function decode_xml_document(xmldata)
|
||||
|
||||
@@ -72,7 +72,8 @@ end
|
||||
-- This function implements all the supported parameters described in:
|
||||
-- Version 5.0 (draft 1) 24 January 2008
|
||||
--
|
||||
-- @param socket socket, connected to the remote web server
|
||||
-- @param host string, the ip of the remote server
|
||||
-- @param port number, the port of the remote server
|
||||
-- @return string HTTP response data
|
||||
--
|
||||
function request_server_farm_data( host, port )
|
||||
@@ -379,7 +380,6 @@ end
|
||||
--
|
||||
-- @param host string the host which is to be queried
|
||||
-- @param port number the port number of the XML service
|
||||
-- @param params table with parameters
|
||||
-- @return string HTTP response data
|
||||
--
|
||||
function request_capabilities( host, port )
|
||||
|
||||
@@ -931,8 +931,6 @@ end
|
||||
--
|
||||
-- @param host The host to connect to.
|
||||
-- @param port The port to connect to.
|
||||
-- @param method The method to use, a string like <code>"GET"</code> or <code>"HEAD"</code>.
|
||||
-- @param path The path to retrieve.
|
||||
-- @param options A table of other parameters. It may have any of these fields:
|
||||
-- * <code>timeout</code>: A timeout used for socket operations.
|
||||
-- * <code>header</code>: A table containing additional headers to be used for the request.
|
||||
@@ -1154,7 +1152,6 @@ end
|
||||
-- @param host The host to query.
|
||||
-- @param port The port for the host.
|
||||
-- @param allReqs A table with all the previously built pipeline requests
|
||||
-- @param options A table with options to configure the pipeline request
|
||||
-- @return A table with multiple http response tables
|
||||
pipeline = function(host, port, allReqs)
|
||||
stdnse.print_debug("Total number of pipelined requests: " .. #allReqs)
|
||||
@@ -1457,7 +1454,6 @@ end
|
||||
-- the user.
|
||||
--
|
||||
-- @param body The body of the page.
|
||||
-- @param uri The URI that the page came from.
|
||||
local function clean_404(body)
|
||||
-- Remove anything that looks like time
|
||||
body = string.gsub(body, '%d?%d:%d%d:%d%d', "")
|
||||
|
||||
@@ -441,8 +441,8 @@ end
|
||||
--- Parses json data into an object form
|
||||
-- This is the method you probably want to use if you
|
||||
-- use this library from a script.
|
||||
--@param input : a json string
|
||||
--@return status : true if ok, false if bad
|
||||
--@param data a json string
|
||||
--@return status true if ok, false if bad
|
||||
--@return an object representing the json, or error message
|
||||
function parse(data)
|
||||
local parser = Json:new(data)
|
||||
|
||||
@@ -194,7 +194,7 @@ end
|
||||
-- that were received prior to the error. In order to achieve this and not terminating the script
|
||||
-- by returning a false status a true status is returned together with a table containing all searchentries.
|
||||
-- This table has the <code>errorMessage</code> and <code>resultCode</code> entries set with the error information.
|
||||
-- As a <code>try</code> won't catch this error it's up to the script to do so. @see ldap-search.nse for an example.
|
||||
-- As a <code>try</code> won't catch this error it's up to the script to do so. See ldap-search.nse for an example.
|
||||
--
|
||||
-- @param socket socket already connected to the ldap server
|
||||
-- @param params table containing at least <code>scope</code>, <code>derefPolicy</code>, <code>baseObject</code>
|
||||
|
||||
@@ -1600,7 +1600,7 @@ function samr_getmembersinalias(smbstate, alias_handle)
|
||||
return true, result
|
||||
end
|
||||
|
||||
---Call the <code>LookupRids</code> function, which converts a list of RIDs to
|
||||
-- Call the <code>LookupRids</code> function, which converts a list of RIDs to
|
||||
-- names.
|
||||
--
|
||||
--NOTE: This doesn't appear to work (it generates a fault, despite the packet being properly formatted).
|
||||
|
||||
@@ -581,9 +581,9 @@ end
|
||||
|
||||
--- Creates a cryptographic hash to be used for login
|
||||
--
|
||||
-- @param string username
|
||||
-- @param string password
|
||||
-- @param string salt
|
||||
-- @param username username
|
||||
-- @param password password
|
||||
-- @param salt salt
|
||||
-- @return string suitable for login request
|
||||
function createMD5LoginHash(username, password, salt)
|
||||
local md5_1 = select( 2, bin.unpack( "H16", openssl.md5(password..username) ) ):lower()
|
||||
|
||||
@@ -871,7 +871,7 @@ NFS = {
|
||||
-- @return status true on success, false on failure
|
||||
-- @return statfs table with the fields <code>transfer_size</code>, <code>block_size</code>,
|
||||
-- <code>total_blocks</code>, <code>free_blocks</code> and <code>available_blocks</code>
|
||||
-- @returns errormsg if status is false
|
||||
-- @return errormsg if status is false
|
||||
StatFs = function( self, file_handle )
|
||||
|
||||
local status, packet
|
||||
@@ -1283,7 +1283,7 @@ Helper = {
|
||||
-- @param host table
|
||||
-- @param port table
|
||||
-- @param program_id number containing the RPC program ID
|
||||
-- @param protcol string containing either "tcp" or "udp"
|
||||
-- @param protocol string containing either "tcp" or "udp"
|
||||
-- @return status true on success, false on failure
|
||||
-- @return table containing the portmapper information as returned by
|
||||
-- <code>Portmap.Dump</code>
|
||||
|
||||
@@ -309,7 +309,6 @@ end
|
||||
-- SMB).
|
||||
--
|
||||
-- @param host The host object
|
||||
-- @param overrides [optional] Overrides for various fields
|
||||
-- @return (status, smb) if the status is true, result is the newly crated smb object;
|
||||
-- otherwise, socket is the error message.
|
||||
function start(host)
|
||||
@@ -2177,7 +2176,6 @@ end
|
||||
--@param overrides A table of override values that's passed to the smb functions.
|
||||
--@param encoded Set to 'true' if the file is encoded (xor'ed with 0xFF), It will be decoded before upload. Default: false
|
||||
--@return (status, err) If status is false, err is an error message. Otherwise, err is undefined.
|
||||
require 'nsedebug'
|
||||
function file_upload(host, localfile, share, remotefile, overrides, encoded)
|
||||
local status, err, smbstate
|
||||
local chunk = 1024
|
||||
@@ -2340,7 +2338,7 @@ end
|
||||
--
|
||||
--@param host The host object
|
||||
--@param share The share to read it from (eg, C$).
|
||||
--@param fo;es A list of files to look for; it is relative to the share's root.
|
||||
--@param files A list of files to look for; it is relative to the share's root.
|
||||
--@param overrides [optional] Override various fields in the SMB packets.
|
||||
--@return status: A true/false value indicating success
|
||||
--@return count: The number of files that existed, or an error message if status is 'false'
|
||||
@@ -2611,7 +2609,6 @@ end
|
||||
-- bad, because it means we cannot tell whether or not a share exists).
|
||||
--
|
||||
--@param host The host object
|
||||
--@param share The share to test
|
||||
--@return (status, result) If status is false, result is an error message. Otherwise, result is a boolean value:
|
||||
-- true if the file was successfully written, false if it was not.
|
||||
function share_host_returns_proper_error(host)
|
||||
@@ -2665,7 +2662,7 @@ end
|
||||
---Get all the details we can about the share. These details are stored in a table and returned.
|
||||
--
|
||||
--@param host The host object.
|
||||
--@param shares An array of shares to check.
|
||||
--@param share An array of shares to check.
|
||||
--@return (status, result) If status is false, result is an error message. Otherwise, result is a boolean value:
|
||||
-- true if the file was successfully written, false if it was not.
|
||||
function share_get_details(host, share)
|
||||
|
||||
@@ -444,8 +444,8 @@ end
|
||||
---Create the LM mac key, which is used for message signing. For basic authentication, it's the first 8 bytes
|
||||
-- of the lanman hash, followed by 8 null bytes, followed by the lanman response; for extended authentication,
|
||||
-- this is just the first 8 bytes of the lanman hash followed by 8 null bytes.
|
||||
--@param ntlm_hash The NTLM hash.
|
||||
--@param ntlm_response The NTLM response.
|
||||
--@param lm_hash The NTLM hash.
|
||||
--@param lm_response The NTLM response.
|
||||
--@param is_extended Should be set if extended security negotiations are being used.
|
||||
function lm_create_mac_key(lm_hash, lm_response, is_extended)
|
||||
if(have_ssl ~= true) then
|
||||
|
||||
@@ -18,7 +18,7 @@ http://wiki.apache.org/couchdb/HTTP_database_API
|
||||
-- | 5 = creditcards
|
||||
-- | 6 = test_suite_users
|
||||
-- |_ 7 = test_suite_db_b
|
||||
--@version 0.2
|
||||
-- version 0.2
|
||||
-- Created 01/12/2010 - v0.1 - created by Martin Holst Swende <martin@swende.se>
|
||||
|
||||
-- TODO : Authentication not implemented
|
||||
|
||||
@@ -30,7 +30,7 @@ http://wiki.apache.org/couchdb/HTTP_database_API
|
||||
-- | current = 5
|
||||
-- | count = 1617
|
||||
-- |_ Authentication : NOT enabled ('admin party')
|
||||
--@version 0.3
|
||||
-- version 0.3
|
||||
--
|
||||
-- Created 01/20/2010 - v0.1 - created by Martin Holst Swende <martin@swende.se>
|
||||
-- Modified 07/02/2010 - v0.2 - added test if auth is enabled, compacted output a bit (mhs)
|
||||
|
||||
@@ -435,7 +435,7 @@ actions[61] = {name="Client Identifier (client)", func=read_string,
|
||||
--@param overrides [optional] A table of overrides. If a field in the table matches a field in the DHCP
|
||||
-- packet (see rfc2131 section 2 for a list of possible fields. Or, just look at the
|
||||
-- code.
|
||||
--@param leasetime [optional] The lease time for which to request an IP. Default: 1 second.
|
||||
--@param lease_time [optional] The lease time for which to request an IP. Default: 1 second.
|
||||
--@return The packet, as a string. It should be sent to the server on UDP/67.
|
||||
local function dhcp_build(request_type, ip_address, mac_address, request_options, overrides, lease_time)
|
||||
local packet = ''
|
||||
|
||||
@@ -28,7 +28,7 @@ Attempts to get tables from a MongoDB
|
||||
-- | sizeOnDisk = 1
|
||||
-- | name = admin
|
||||
-- |_ totalSize = 167772160
|
||||
--@version 0.1
|
||||
-- version 0.1
|
||||
-- Created 01/12/2010 - v0.1 - created by Martin Holst Swende <martin@swende.se>
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ Attempts to get build info and server status from a MongoDB
|
||||
-- | heap_usage_bytes = 117120
|
||||
-- | note = fields vary by platform
|
||||
-- |_ page_faults = 0
|
||||
--@version 0.2
|
||||
-- version 0.2
|
||||
-- Created 01/12/2010 - v0.1 - created by Martin Holst Swende <martin@swende.se>
|
||||
|
||||
|
||||
|
||||
@@ -170,7 +170,6 @@ end
|
||||
|
||||
--- Create a TCP Packet object
|
||||
-- @param host Host object
|
||||
-- @param port Port number
|
||||
-- @return TCP Packet object
|
||||
local genericpkt = function(host)
|
||||
local pkt = bin.pack("H",
|
||||
|
||||
@@ -27,7 +27,7 @@ smtp-enum-users.methods={EXPN,RCPT,VRFY}
|
||||
-- @args smtp-enum-users.domain Define the domain to be used in the SMTP commands
|
||||
-- @args smtp-enum-users.methods Define the methods and order to be used by the script (EXPN, VRFY, RCPT)
|
||||
--
|
||||
-- @changelog
|
||||
-- changelog
|
||||
-- 2010-03-07 Duarte Silva <duarte.silva@myf00.net>
|
||||
-- * First version ;)
|
||||
-- 2010-03-14 Duarte Silva <duarte.silva@myf00.net>
|
||||
@@ -256,6 +256,8 @@ function do_vrfy(socket, username, domain)
|
||||
return do_gnrc(socket, "VRFY", username, domain)
|
||||
end
|
||||
|
||||
issued_from = false
|
||||
|
||||
---Verify if a username is valid using the RCPT method. It will only issue the MAIL FROM
|
||||
-- command if the issued_from flag is false. The MAIL FROM command does not need to
|
||||
-- be issued each time an RCPT TO is used. Otherwise it should also be issued a RSET
|
||||
@@ -265,8 +267,6 @@ end
|
||||
-- @param username User name to test
|
||||
-- @param domain Domain to use in the command
|
||||
-- @return Status and depending on the code, a error message
|
||||
issued_from = false
|
||||
|
||||
function do_rcpt(socket, username, domain)
|
||||
if not issued_from then
|
||||
-- Lets try to issue MAIL FROM command.
|
||||
|
||||
@@ -32,7 +32,7 @@ printed with the list of any combinations that were found prior to the error.
|
||||
-- @args smtp-open-relay.to Define the destination email address to be used (without the domain, default is
|
||||
-- relaytest)
|
||||
--
|
||||
-- @changelog
|
||||
-- changelog
|
||||
-- 2007-05-16 Arturo 'Buanzo' Busleiman <buanzo@buanzo.com.ar>
|
||||
-- + Added some strings to return in different places
|
||||
-- * Changed "HELO www.[ourdomain]" to "EHLO [ourdomain]"
|
||||
|
||||
@@ -73,7 +73,7 @@ local iana_types = { "other", "regular1822", "hdh1822", "ddnX25", "rfc877x25", "
|
||||
--- Walks the MIB Tree
|
||||
--
|
||||
-- @param socket socket already connected to the server
|
||||
-- @base_oid string containing the base object ID to walk
|
||||
-- @param base_oid string containing the base object ID to walk
|
||||
-- @return table containing <code>oid</code> and <code>value</code>
|
||||
function snmp_walk( socket, base_oid )
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ portrule = shortport.portnumber(161, "udp", {"open", "open|filtered"})
|
||||
--- Walks the MIB Tree
|
||||
--
|
||||
-- @param socket socket already connected to the server
|
||||
-- @base_oid string containing the base object ID to walk
|
||||
-- @param base_oid string containing the base object ID to walk
|
||||
-- @return table containing <code>oid</code> and <code>value</code>
|
||||
function snmp_walk( socket, base_oid )
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ portrule = shortport.portnumber(161, "udp", {"open", "open|filtered"})
|
||||
--- Walks the MIB Tree
|
||||
--
|
||||
-- @param socket socket already connected to the server
|
||||
-- @base_oid string containing the base object ID to walk
|
||||
-- @param base_oid string containing the base object ID to walk
|
||||
-- @return table containing <code>oid</code> and <code>value</code>
|
||||
function snmp_walk( socket, base_oid )
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ portrule = shortport.portnumber(161, "udp", {"open", "open|filtered"})
|
||||
--- Walks the MIB Tree
|
||||
--
|
||||
-- @param socket socket already connected to the server
|
||||
-- @base_oid string containing the base object ID to walk
|
||||
-- @param base_oid string containing the base object ID to walk
|
||||
-- @return table containing <code>oid</code> and <code>value</code>
|
||||
function snmp_walk( socket, base_oid )
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ portrule = shortport.portnumber(161, "udp", {"open", "open|filtered"})
|
||||
--- Walks the MIB Tree
|
||||
--
|
||||
-- @param socket socket already connected to the server
|
||||
-- @base_oid string containing the base object ID to walk
|
||||
-- @param base_oid string containing the base object ID to walk
|
||||
-- @return table containing <code>oid</code> and <code>value</code>
|
||||
function snmp_walk( socket, base_oid )
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ portrule = shortport.portnumber(161, "udp", {"open", "open|filtered"})
|
||||
--- Walks the MIB Tree
|
||||
--
|
||||
-- @param socket socket already connected to the server
|
||||
-- @base_oid string containing the base object ID to walk
|
||||
-- @param base_oid string containing the base object ID to walk
|
||||
-- @return table containing <code>oid</code> and <code>value</code>
|
||||
function snmp_walk( socket, base_oid )
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ portrule = shortport.portnumber(161, "udp", {"open", "open|filtered"})
|
||||
--- Walks the MIB Tree
|
||||
--
|
||||
-- @param socket socket already connected to the server
|
||||
-- @base_oid string containing the base object ID to walk
|
||||
-- @param base_oid string containing the base object ID to walk
|
||||
-- @return table containing <code>oid</code> and <code>value</code>
|
||||
function snmp_walk( socket, base_oid )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user