diff --git a/CHANGELOG b/CHANGELOG index f613d2bdb..894a1290e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/nselib/http.lua b/nselib/http.lua index 8363ff541..d1cdfc91f 100644 --- a/nselib/http.lua +++ b/nselib/http.lua @@ -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