1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-09 07:59:03 +00:00

Updated documentation for Kris' scripts.

This commit is contained in:
batrick
2008-08-14 23:47:51 +00:00
parent 789906f3a8
commit cbfde183cb
3 changed files with 62 additions and 19 deletions

View File

@@ -1,10 +1,13 @@
-- Send HTTP TRACE method and print any modifications
-- The HTTP TRACE method is used to show any modifications made by
-- intermediate servers or proxies between you and the target host.
-- This script shows these modifications, which you can use for
-- diagnostic purposes (such as testing for web server or network
-- problems). Plus, it's just really cool :)
--- Sends and HTTP TRACE and describes any modifications
--
--@output
-- 80/tcp open http \n
-- | HTTP TRACE: Response differs from request. First 5 additional lines: \n
-- | Cookie: UID=d4287aa38d02f409841b4e0c0050c13148a85d01c0c0a154d4ef56dfc2b4fc1b0 \n
-- | Country: us \n
-- | Ip_is_advertise_combined: yes \n
-- | Ip_conntype-Confidence: -1 \n
-- |_ Ip_line_speed: medium
-- 08/31/2007
@@ -22,6 +25,9 @@ require "comm"
require "shortport"
require "stdnse"
--- Truncates and formats the first 5 elements of a table
--@param tab The table to truncate
--@return Truncated, formatted table
local truncate = function(tab)
local str = ""
str = str .. tab[1] .. "\n"
@@ -32,6 +38,11 @@ local truncate = function(tab)
return str
end
--- Validates the HTTP response and checks for modifications
--@param response The HTTP response from the server
--@param original The original HTTP request sent to the server
--@return A string describing the changes (if any) between the response and
-- request
local validate = function(response, original)
local start, stop
local body