Nmap Development mailing list archives
Re: [patch] Fix 2 scripts: p2p-conficker, http-vhosts
From: David Fifield <david () bamsoftware com>
Date: Mon, 18 Jul 2011 13:43:25 -0700
On Sun, Jun 26, 2011 at 03:50:52PM -0500, Daniel Miller wrote:
Hey list, Simple patch here to fix a couple issues I found while testing my XML output patch. p2p-conficker was returning two values, but the runtime only takes the first one, so it wouldn't produce meaningful output. http-vhosts was missing a length operator when indexing a table, so you'd get an error about using a table in an arithmetic calculation. Side note on that one: which is better, style-wise and for performance? mytable[#mytable+1] = "value" --or table.insert(mytable, "value") Thanks! Dan ---patch--- Index: scripts/p2p-conficker.nse =================================================================== --- scripts/p2p-conficker.nse (revision 24391) +++ scripts/p2p-conficker.nse (working copy) @@ -621,6 +621,6 @@ table.insert(response, string.format("%d/%d checks are positive: Host is likely INFECTED", count, checks)) end - return true, stdnse.format_output(true, response) + return stdnse.format_output(true, response) end Index: scripts/http-vhosts.nse =================================================================== --- scripts/http-vhosts.nse (revision 24391) +++ scripts/http-vhosts.nse (working copy) @@ -547,7 +547,7 @@ if not http_response["ERROR"] then result["ERROR"]={} end - result["ERROR"][result["ERROR"] + 1] = targetname + result["ERROR"][#result["ERROR"] + 1] = targetname else local status = tostring(http_response.status) if not result[status] then
Thanks Dan, I committed your fixes. David Fifield _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Re: [patch] Fix 2 scripts: p2p-conficker, http-vhosts David Fifield (Jul 18)
- Re: [patch] Fix 2 scripts: p2p-conficker, http-vhosts Daniel Miller (Jul 18)