Nmap Development mailing list archives
[patch] Fix 2 scripts: p2p-conficker, http-vhosts
From: Daniel Miller <bonsaiviking () gmail com>
Date: Sun, 26 Jun 2011 15:50:52 -0500
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
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/
Current thread:
- [patch] Fix 2 scripts: p2p-conficker, http-vhosts Daniel Miller (Jun 26)
