From 390eb9e4ab6b57344958d902333f9c08b2c3be76 Mon Sep 17 00:00:00 2001 From: paulino Date: Fri, 1 Jul 2011 20:34:01 +0000 Subject: [PATCH] * Fixes bug when parsing script-args. The script was only using the value from the argument 'pipeline' but not from 'http-enum.pipeline'. * Makes clean_404 a public function. This function is used in the NSE script http-waf-detect to remove text that changes. --- nselib/http.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nselib/http.lua b/nselib/http.lua index 32038eacd..6cf7d6a25 100644 --- a/nselib/http.lua +++ b/nselib/http.lua @@ -825,7 +825,7 @@ local function getPipelineMax(response) local pipeline = stdnse.get_script_args({'http.pipeline', 'pipeline'}) if(pipeline) then - return tonumber(nmap.registry.args.pipeline) + return tonumber(pipeline) end if response then @@ -1731,7 +1731,7 @@ end -- the user. -- -- @param body The body of the page. -local function clean_404(body) +function clean_404(body) -- Remove anything that looks like time body = string.gsub(body, '%d?%d:%d%d:%d%d', "") body = string.gsub(body, '%d%d:%d%d', "")