mirror of
https://github.com/nmap/nmap.git
synced 2026-01-19 12:49:02 +00:00
Update the documentation for some scripts and modules that I used in the NSEDoc
section of scripting.xml.
This commit is contained in:
@@ -1,20 +1,21 @@
|
||||
--- Common communication functions for network discovery tasks like
|
||||
-- banner grabbing and data exchange.
|
||||
-- \n\n
|
||||
--
|
||||
-- The functions in this module return values appropriate for use with
|
||||
-- exception handling via nmap.new_try().
|
||||
-- \n\n
|
||||
-- exception handling via <code>nmap.new_try()</code>.
|
||||
--
|
||||
-- These functions may be passed a table of options, but it's not
|
||||
-- required. The keys for the options table are "bytes", "lines",
|
||||
-- "proto", and "timeout". "bytes" sets a minimum number of bytes to
|
||||
-- read. "lines" does the same for lines. "proto" sets the protocol to
|
||||
-- communicate with, defaulting to "tcp" if not provided. "timeout" sets
|
||||
-- the socket timeout (see the socket function set_timeout() for
|
||||
-- details).
|
||||
-- \n\n
|
||||
-- the socket timeout (see the socket function
|
||||
-- <code>set_timeout()</code> for details).
|
||||
--
|
||||
-- If both "bytes" and "lines" are provided, "lines" takes precedence.
|
||||
-- If neither are given, the functions read as many bytes as possible.
|
||||
-- @author Kris Katterjohn 04/2008
|
||||
-- @copyright Same as Nmap--See http://nmap.org/book/man-legal.html
|
||||
|
||||
module(... or "comm", package.seeall)
|
||||
|
||||
|
||||
@@ -22,11 +22,11 @@ module(... or "stdnse");
|
||||
--
|
||||
-- This is a convenience wrapper around
|
||||
-- <code>nmap.print_debug_unformatted()</code>. The first optional numeric
|
||||
-- argument, verbosity, is used as the verbosity level necessary to print the
|
||||
-- message (it defaults to 1 if omitted). All remaining arguments are processed
|
||||
-- with Lua's <code>string.format()</code> function.
|
||||
-- argument, <code>verbosity</code>, is used as the verbosity level necessary
|
||||
-- to print the message (it defaults to 1 if omitted). All remaining arguments
|
||||
-- are processed with Lua's <code>string.format()</code> function.
|
||||
-- @param level Optional verbosity level.
|
||||
-- @param fmt Format string according to string.format specifiers.
|
||||
-- @param fmt Format string.
|
||||
-- @param ... Arguments to format.
|
||||
print_debug = function(level, fmt, ...)
|
||||
local verbosity = tonumber(level);
|
||||
|
||||
@@ -2,30 +2,29 @@ id = "AS Numbers"
|
||||
description = [[
|
||||
Maps IP addresses to autonomous system (AS) numbers.
|
||||
|
||||
The script works by sending DNS TXT queries to a DNS server which in turn
|
||||
queries a third-party service provided by Team Cymru (team-cymru.org) using an
|
||||
in-addr.arpa style zone set-up especially for use by Nmap.
|
||||
The script works by sending DNS TXT queries to a DNS server which in
|
||||
turn queries a third-party service provided by Team Cymru
|
||||
(team-cymru.org) using an in-addr.arpa style zone set-up especially for
|
||||
use by Nmap.
|
||||
|
||||
The responses to these queries contain both Origin and Peer ASNs and their
|
||||
descriptions, displayed along with the BG Prefix and Country Code.
|
||||
The responses to these queries contain both Origin and Peer ASNs and
|
||||
their descriptions, displayed along with the BG Prefix and Country Code.
|
||||
|
||||
The script caches results to reduce the number of queries and should perform a
|
||||
single query for all scanned targets in a BG Prefix present in Team Cymru's
|
||||
database.
|
||||
The script caches results to reduce the number of queries and should
|
||||
perform a single query for all scanned targets in a BG Prefix present in
|
||||
Team Cymru's database.
|
||||
|
||||
Be aware that any targets against which this script is run will be sent to and
|
||||
potentially recorded by one or more DNS servers and Team Cymru. In addition
|
||||
your IP address will be sent along with the ASN to a DNS server (your default
|
||||
DNS server, or whichever you specified with the <code>dns</code> script argument).
|
||||
Be aware that any targets against which this script is run will be sent
|
||||
to and potentially recorded by one or more DNS servers and Team Cymru.
|
||||
In addition your IP address will be sent along with the ASN to a DNS
|
||||
server (your default DNS server, or whichever you specified with the
|
||||
<code>dns</code> script argument).
|
||||
]]
|
||||
|
||||
|
||||
---
|
||||
-- @usage
|
||||
-- nmap <target> --script asn
|
||||
--
|
||||
-- @args dns Optional recursive nameserver. (Use <code>--script-args dns=192.168.1.1</code>.)
|
||||
--
|
||||
-- nmap --script ASN.nse [--script-args dns=<dns server>] <target>
|
||||
-- @args dns The address of a recursive nameserver to use (optional).
|
||||
-- @output
|
||||
-- Host script results:
|
||||
-- | AS Numbers:
|
||||
@@ -35,8 +34,6 @@ DNS server, or whichever you specified with the <code>dns</code> script argument
|
||||
-- | BGP: 64.13.128.0/18 | Country: US
|
||||
-- | Origin AS: 10565 SVCOLO-AS - Silicon Valley Colocation, Inc.
|
||||
-- |_ Peer AS: 174 2914 6461
|
||||
--
|
||||
|
||||
|
||||
author = "jah, Michael"
|
||||
license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
id = "Anonymous FTP"
|
||||
description = [[
|
||||
Checks if a FTP server allows anonymous logins.
|
||||
Checks if an FTP server allows anonymous logins.
|
||||
]]
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user