mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 21:21:31 +00:00
Fix to use stdnse.get_script_args() instead of getting the arguments from the registry.
This commit is contained in:
@@ -49,7 +49,7 @@ end
|
|||||||
--MAIN
|
--MAIN
|
||||||
---
|
---
|
||||||
action = function(host, port)
|
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 malware_found = false
|
||||||
local target
|
local target
|
||||||
local output_lns = {}
|
local output_lns = {}
|
||||||
@@ -61,7 +61,7 @@ action = function(host, port)
|
|||||||
target = host.targetname
|
target = host.targetname
|
||||||
end
|
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
|
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",
|
return string.format("[ERROR] No API key found. Update the variable APIKEY in %s or set it in the argument %s.api",
|
||||||
|
|||||||
Reference in New Issue
Block a user