From 683e83117b0192b625891f9b90714d9a3ed8e535 Mon Sep 17 00:00:00 2001 From: sophron Date: Sat, 17 Aug 2013 06:03:45 +0000 Subject: [PATCH] [NSE] Convert these values to numeric (for example, when they passed as command line args). --- nselib/httpspider.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nselib/httpspider.lua b/nselib/httpspider.lua index c11dc96b1..6009fe090 100644 --- a/nselib/httpspider.lua +++ b/nselib/httpspider.lua @@ -974,8 +974,8 @@ Crawler = { if ( not ( type(self.options.doscraping) == "function" ) ) then self.options.doscraping = false end - self.options.maxdepth = self.options.maxdepth or 3 - self.options.maxpagecount = self.options.maxpagecount or 20 + self.options.maxdepth = tonumber(self.options.maxdepth) or 3 + self.options.maxpagecount = tonumber(self.options.maxpagecount) or 20 self.url = self.url or '/' end,