mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 14:11:29 +00:00
Add options to http-enum fingerprints format. Patch based on work by Josh Amishav-Zlatin
This commit is contained in:
@@ -47,6 +47,14 @@ local table = require "table"
|
|||||||
-- fingerprint.probes[i].method [optional; default: 'GET'}}]
|
-- fingerprint.probes[i].method [optional; default: 'GET'}}]
|
||||||
-- The HTTP method to use when making requests ('GET'}}, 'POST', 'HEAD', 'PUT', 'DELETE', etc
|
-- The HTTP method to use when making requests ('GET'}}, 'POST', 'HEAD', 'PUT', 'DELETE', etc
|
||||||
--
|
--
|
||||||
|
-- fingerprint.probes[i].nopipeline [optional; default: false]
|
||||||
|
-- Do not use HTTP pipelining to send this request.
|
||||||
|
--
|
||||||
|
-- fingerprint.probes[i].options [optional]
|
||||||
|
-- An options table as defined in http.lua. Can be used to provide POST data or
|
||||||
|
-- override defaults. Note that when HTTP pipelining is used, not all of these
|
||||||
|
-- options will be used.
|
||||||
|
--
|
||||||
-- fingerprint.ignore_404 [optional; default: false]
|
-- fingerprint.ignore_404 [optional; default: false]
|
||||||
-- If set, the automatic checks for 404 and custom 404 pages are disabled for that check.
|
-- If set, the automatic checks for 404 and custom 404 pages are disabled for that check.
|
||||||
-- Every page will be included unless fingerprint.matches.dontmatch excludes it.
|
-- Every page will be included unless fingerprint.matches.dontmatch excludes it.
|
||||||
|
|||||||
@@ -396,15 +396,16 @@ action = function(host, port)
|
|||||||
for i = 1, #fingerprints, 1 do
|
for i = 1, #fingerprints, 1 do
|
||||||
-- Add each path. The order very much matters here.
|
-- Add each path. The order very much matters here.
|
||||||
for j = 1, #fingerprints[i].probes, 1 do
|
for j = 1, #fingerprints[i].probes, 1 do
|
||||||
if fingerprints[i].probes[j].nopipeline then
|
local probe = fingerprints[i].probes[j]
|
||||||
local res = http.generic_request(host, port, fingerprints[i].probes[j].method or 'GET', basepath .. fingerprints[i].probes[j].path, nil)
|
if probe.nopipeline then
|
||||||
|
local res = http.generic_request(host, port, probe.method or 'GET', basepath .. probe.path, probe.options or nil)
|
||||||
if res.status then
|
if res.status then
|
||||||
table.insert(results_nopipeline, res)
|
table.insert(results_nopipeline, res)
|
||||||
else
|
else
|
||||||
table.insert(results_nopipeline, false)
|
table.insert(results_nopipeline, false)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
all = http.pipeline_add(basepath .. fingerprints[i].probes[j].path, nil, all, fingerprints[i].probes[j].method or 'GET')
|
all = http.pipeline_add(basepath .. probe.path, probe.options or nil, all, probe.method or 'GET')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user