1
0
mirror of https://github.com/nmap/nmap.git synced 2026-02-02 11:39:03 +00:00

more stdnse.print_debug -> stdnse.debug

$ sed -i 's/stdnse.print_debug( *\([0-9]*\) *, *" *%s *:* *\([^"]*\)" *, *SCRIPT_NAME/stdnse.debug\1("\2"/' *.nse
$ sed -i 's/stdnse.print_debug( *" *%s *:* *\([^"]*\)" *, *SCRIPT_NAME/stdnse.debug1("\1"/' *.nse
This commit is contained in:
batrick
2014-08-02 02:08:12 +00:00
parent a763dc81a8
commit d47acf9f5e
49 changed files with 162 additions and 162 deletions

View File

@@ -61,15 +61,15 @@ action = function( host, port )
local result = {}
local region_servers = {}
local uri = "/master.jsp"
stdnse.print_debug(1, "%s:HTTP GET %s:%s%s", SCRIPT_NAME, host.targetname or host.ip, port.number, uri)
stdnse.debug1("HTTP GET %s:%s%s", host.targetname or host.ip, port.number, uri)
local response = http.get( host, port, uri )
stdnse.debug1("Status %s",response['status-line'] or "No Response")
if response['status-line'] and response['status-line']:match("200%s+OK") and response['body'] then
local body = response['body']:gsub("%%","%%%%")
stdnse.print_debug(2, "%s: Body %s\n", SCRIPT_NAME,body)
stdnse.debug2("Body %s\n",body)
if body:match("HBase%s+Version</td><td>([^][<]+)") then
local version = body:match("HBase%s+Version</td><td>([^][<]+)"):gsub("%s+", " ")
stdnse.print_debug(1, "%s:Hbase Version %s", SCRIPT_NAME,version)
stdnse.debug1("Hbase Version %s",version)
table.insert(result, ("Hbase Version: %s"):format(version))
port.version.version = version
end
@@ -111,7 +111,7 @@ action = function( host, port )
end
end
for line in string.gmatch(body, "[^\n]+") do
stdnse.print_debug(3, "%s: Line %s\n", SCRIPT_NAME,line)
stdnse.debug3("Line %s\n",line)
if line:match("maxHeap") then
local region_server= line:match("\">([^][<]+)</a>")
stdnse.debug1("Region Server %s",region_server)