mirror of
https://github.com/nmap/nmap.git
synced 2026-02-10 07:26:34 +00:00
more stdnse.print_debug -> stdnse.debug
This is a catchall pattern with a few exclusions. $ sed -i 's/stdnse.print_debug( *\([0-9]*\) *, *\(.*\))/stdnse.debug\1(\2)/' *.nse $ sed -i 's/stdnse.print_debug(\(.*\))/stdnse.debug1(\1)/' *.nse Excluded: $ svn revert db2-das-info.nse $ svn revert flume-master-info.nse $ svn revert http-headers.nse $ svn revert http-methods.nse $ svn revert http-unsafe-output-escaping.nse $ svn revert http-userdir-enum.nse $ svn revert http-vuln-cve2011-3192.nse $ svn revert http-vuln-wnr1000-creds.nse $ svn revert http-wordpress-plugins.nse $ svn revert telnet-brute.nse
This commit is contained in:
@@ -74,7 +74,7 @@ action = function(host, port)
|
||||
orig_req = http.get(host, port, path)
|
||||
orig_req.body = http.clean_404(orig_req.body)
|
||||
if orig_req.status and orig_req.body then
|
||||
stdnse.print_debug(3, "Normal HTTP response -> Status:%d Body:\n%s", orig_req.status, orig_req.body)
|
||||
stdnse.debug3("Normal HTTP response -> Status:%d Body:\n%s", orig_req.status, orig_req.body)
|
||||
else
|
||||
return "[ERROR] Initial HTTP request failed"
|
||||
end
|
||||
@@ -88,7 +88,7 @@ action = function(host, port)
|
||||
--perform the "3v1l" requests to try to trigger the IDS/IPS/WAF
|
||||
tests = nil
|
||||
for _, vector in pairs(attack_vectors_n1) do
|
||||
stdnse.print_debug(2, "Probing with payload:%s",vector)
|
||||
stdnse.debug2("Probing with payload:%s",vector)
|
||||
tests = http.pipeline_add(path..vector, nil, tests)
|
||||
end
|
||||
local test_results = http.pipeline_go(host, port, tests)
|
||||
@@ -110,9 +110,9 @@ action = function(host, port)
|
||||
if payload_example and ( string.len(payload_example) > string.len(attack_vectors_n1[i]) ) then
|
||||
payload_example = attack_vectors_n1[i]
|
||||
end
|
||||
stdnse.print_debug(2, "Payload:%s triggered the IDS/IPS/WAF", attack_vectors_n1[i])
|
||||
stdnse.debug2("Payload:%s triggered the IDS/IPS/WAF", attack_vectors_n1[i])
|
||||
if res.status and res.body then
|
||||
stdnse.print_debug(3, "Status:%s Body:%s\n", res.status, res.body)
|
||||
stdnse.debug3("Status:%s Body:%s\n", res.status, res.body)
|
||||
end
|
||||
waf_bool = true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user