diff --git a/nselib/data/http-fingerprints.lua b/nselib/data/http-fingerprints.lua index 9538f797e..6ceab7687 100644 --- a/nselib/data/http-fingerprints.lua +++ b/nselib/data/http-fingerprints.lua @@ -47,6 +47,14 @@ local table = require "table" -- fingerprint.probes[i].method [optional; default: 'GET'}}] -- 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] -- 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. diff --git a/scripts/http-enum.nse b/scripts/http-enum.nse index d4f324c7a..6ed0a560e 100644 --- a/scripts/http-enum.nse +++ b/scripts/http-enum.nse @@ -396,15 +396,16 @@ action = function(host, port) for i = 1, #fingerprints, 1 do -- Add each path. The order very much matters here. for j = 1, #fingerprints[i].probes, 1 do - if fingerprints[i].probes[j].nopipeline then - local res = http.generic_request(host, port, fingerprints[i].probes[j].method or 'GET', basepath .. fingerprints[i].probes[j].path, nil) + local probe = fingerprints[i].probes[j] + 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 table.insert(results_nopipeline, res) else table.insert(results_nopipeline, false) end 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