mirror of
https://github.com/nmap/nmap.git
synced 2026-01-13 09:59:01 +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:
@@ -7,7 +7,8 @@ o A new script argument, http.useragent, gives the ability to modify
|
||||
the User-Agent header sent by NSE from its default of "Mozilla/5.0
|
||||
(compatible; Nmap Scripting Engine; http://nmap.org/book/nse.html)".
|
||||
You can set it to the empty string to disable the User-Agent
|
||||
entirely. [David]
|
||||
entirely. A bug was found and fixed by Tom Sellers and Jah,
|
||||
respectively. [David]
|
||||
|
||||
o [Nmat] The --ssl, --output, and --hex-dump options now work with
|
||||
--exec and --sh-exec. This is done by forking a separate process to
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user