Nmap Development mailing list archives
Re: [NSE] Multiple script errors
From: Michael Kohl <citizen428 () gmail com>
Date: Sun, 29 Jan 2012 12:30:45 +0100
On Sat, Jan 28, 2012 at 11:04 PM, Patrik Karlsson <patrik () cqure net> wrote:
Thanks for reporting this Duarte. I fixed all of them but http-generator. Will look into it later, unless someone else does.
Would this be too dirty a fix?
diff --git a/scripts/http-generator.nse b/scripts/http-generator.nse
index 40e17ce..e835f1f 100644
--- a/scripts/http-generator.nse
+++ b/scripts/http-generator.nse
@@ -50,7 +50,7 @@ local follow_redirects = function(host, port, path, n)
local pattern = "^[hH][tT][tT][pP]/1.[01] 30[12]"
local response = http.get(host, port, path)
- while response['status-line']:match(pattern) and n > 0 do
+ while (response['status-line'] or ""):match(pattern) and n > 0 do
n = n - 1
loc = response.header['location']
response = http.get_url(loc)
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/
Current thread:
- [NSE] Multiple script errors Duarte Silva (Jan 28)
- Re: [NSE] Multiple script errors Patrik Karlsson (Jan 28)
- Re: [NSE] Multiple script errors Michael Kohl (Jan 29)
- Re: [NSE] Multiple script errors Duarte Silva (Jan 29)
- Re: [NSE] Multiple script errors Patrik Karlsson (Jan 29)
- Re: [NSE] Multiple script errors Michael Kohl (Jan 29)
- Re: [NSE] Multiple script errors Patrik Karlsson (Jan 28)
