mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Fix to use stdnse.get_script_args() instead of getting the arguments from the registry.
This commit is contained in:
parent
5c43a48121
commit
1d150dd875
1 changed files with 2 additions and 2 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue