mirror of
https://github.com/nmap/nmap.git
synced 2026-10-20 19:01:56 +00:00
Check that nmap.registry.args exists before trying to access
nmap.registry.args["http.useragent"]. The args table doesn't exist during --script-updatedb. The bug was found by Tom Sellers and fixed by Jah.
This commit is contained in:
parent
b12d633b5a
commit
f5cae99a2a
2 changed files with 3 additions and 2 deletions
|
|
@ -42,7 +42,7 @@ local have_ssl = (nmap.have_ssl() and pcall(require, "openssl"))
|
|||
|
||||
local USER_AGENT
|
||||
do
|
||||
local arg = nmap.registry.args["http.useragent"]
|
||||
local arg = nmap.registry.args and nmap.registry.args["http.useragent"]
|
||||
if arg and arg == "" then
|
||||
USER_AGENT = nil
|
||||
elseif arg then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue