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

Updated documentation for some scripts.

This commit is contained in:
batrick
2008-08-19 06:50:05 +00:00
parent 8134cda566
commit 42a3d83c70
3 changed files with 23 additions and 13 deletions

View File

@@ -1,3 +1,8 @@
---
--@output
-- | HTTP Auth: HTTP Service requires authentication\n
-- |_ Auth type: Basic, realm = DSL Router\n
-- HTTP authentication information gathering script -- HTTP authentication information gathering script
-- rev 1.1 (2007-05-25) -- rev 1.1 (2007-05-25)

View File

@@ -1,3 +1,14 @@
--- Gather information from an IRC server. It uses STATS, LUSERS, and other
-- queries to obtain this information.
--@output
-- 6665/tcp open irc\n
-- | IRC Server Info: Server: foo.bar.net\n
-- | Version: hyperion-1.0.2b(381). foo.bar.net \n
-- | Lservers/Lusers: 0/4204\n
-- | Uptime: 106 days, 2:46:30\n
-- | Source host: bar.foo.net\n
-- |_ Source ident: OK n=nmap\n
id = "IRC Server Info" id = "IRC Server Info"
description = "Gets information from an IRC server by issuing STATS, LUSERS, etc queries." description = "Gets information from an IRC server by issuing STATS, LUSERS, etc queries."

View File

@@ -1,18 +1,18 @@
----------------------------------------------------------------------- --- This script probes a target for its operating system version.
-- This script probes a target for its operating system version sending -- It sends traffic via UDP port 137 and TCP port 139/445.\n\n
-- traffic via UDP port 137 and TCP port 139/445. First, we need to -- == Implementation Information ==\n
-- First, we need to
-- elicit the NetBIOS share name associated with a workstation share. -- elicit the NetBIOS share name associated with a workstation share.
-- Once we have that, we need to encode the name into the "mangled" -- Once we have that, we need to encode the name into the "mangled"
-- equivalent and send TCP 139/445 traffic to connect to the host and -- equivalent and send TCP 139/445 traffic to connect to the host and
-- in an attempt to elicit the OS version name from an SMB Setup AndX -- in an attempt to elicit the OS version name from an SMB Setup AndX
-- response. -- response.\n\n
-- --
-- Thanks to Michail Prokopyev and xSharez Scanner for required -- Thanks to Michail Prokopyev and xSharez Scanner for required
-- traffic to generate for OS version detection. -- traffic to generate for OS version detection.
-- --
-- Command line to run this script like following: --@usage
-- -- sudo nmap -sU -sS --script netbios-smb-os-discovery.nse -p U:137,T:139 127.0.0.1
-- sudo nmap -sU -sS --script osversion.nse -p U:137,T:139 10.4.12.224
----------------------------------------------------------------------- -----------------------------------------------------------------------
id = "Discover OS Version over NetBIOS and SMB" id = "Discover OS Version over NetBIOS and SMB"
@@ -70,7 +70,6 @@ end
----------------------------------------------------------------------- -----------------------------------------------------------------------
-- A NetBIOS wildcard query is sent to a host in an attempt to discover -- A NetBIOS wildcard query is sent to a host in an attempt to discover
-- any NetBIOS shares on the host. -- any NetBIOS shares on the host.
-----------------------------------------------------------------------
function udp_query(host) function udp_query(host)
@@ -111,7 +110,6 @@ end
-- type/code can be queried later for the OS version. The workstation -- type/code can be queried later for the OS version. The workstation
-- type/code is 0x44 0x00 for OS versions prior to Vista. The type/code -- type/code is 0x44 0x00 for OS versions prior to Vista. The type/code
-- for Vista is 0x04 0x00. -- for Vista is 0x04 0x00.
-----------------------------------------------------------------------
function extract_sharename(resp) function extract_sharename(resp)
@@ -150,7 +148,6 @@ end
----------------------------------------------------------------------- -----------------------------------------------------------------------
-- Extract multiple bytes from a string and return concatenated result -- Extract multiple bytes from a string and return concatenated result
-----------------------------------------------------------------------
function string_concatenate(mystring, start, stop) function string_concatenate(mystring, start, stop)
local x, temp, newname local x, temp, newname
@@ -178,7 +175,6 @@ end
-- in the string "chars" is the corresponding position in the trtable -- in the string "chars" is the corresponding position in the trtable
-- table. The character " had to be handled separately as it is used -- table. The character " had to be handled separately as it is used
-- to delimit the value of chars. -- to delimit the value of chars.
-----------------------------------------------------------------------
encode = function(name) encode = function(name)
@@ -235,7 +231,6 @@ end
-- The workstation share name extracted from the UDP wildcard NetBIOS -- The workstation share name extracted from the UDP wildcard NetBIOS
-- response must be used in the SMB session initiation request(payload 1). -- response must be used in the SMB session initiation request(payload 1).
-- Payload for the requests that follow is static. -- Payload for the requests that follow is static.
-----------------------------------------------------------------------
function tcp_session(ename, host) function tcp_session(ename, host)
@@ -331,7 +326,6 @@ end
-- Response from Session Setup AndX Request (TCP payload 3) -- Response from Session Setup AndX Request (TCP payload 3)
-- Must be SMB response. Extract the OS version from it from a fixed -- Must be SMB response. Extract the OS version from it from a fixed
-- offset in the payload. -- offset in the payload.
-----------------------------------------------------------------------
function extract_version(line) function extract_version(line)