From 1d150dd8753f4a9c478e8d98f95e7521415834d2 Mon Sep 17 00:00:00 2001 From: paulino Date: Sat, 9 Jul 2011 19:59:13 +0000 Subject: [PATCH] Fix to use stdnse.get_script_args() instead of getting the arguments from the registry. --- scripts/http-google-malware.nse | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/http-google-malware.nse b/scripts/http-google-malware.nse index 47d34a57a..424d717e1 100644 --- a/scripts/http-google-malware.nse +++ b/scripts/http-google-malware.nse @@ -49,7 +49,7 @@ end --MAIN --- action = function(host, port) - local apikey = nmap.registry.args["http-google-malware.api"] or APIKEY + local apikey = stdnse.get_script_args("http-google-malware.api") or APIKEY local malware_found = false local target local output_lns = {} @@ -61,7 +61,7 @@ action = function(host, port) target = host.targetname end - local target_url = nmap.registry.args["http-google-malware.url"] or string.format("%s://%s", port.service, target) + local target_url = stdnse.get_script_args("http-google-malware.url") or string.format("%s://%s", port.service, target) if string.len(apikey) < 25 then return string.format("[ERROR] No API key found. Update the variable APIKEY in %s or set it in the argument %s.api",