mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +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
|
||||
---
|
||||
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",
|
||||
|
||||
Reference in New Issue
Block a user