From 1005f198056dee36d625b1176487514194ff0809 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 7 Oct 2011 23:49:45 +0000 Subject: [PATCH] Use a simpler method of getting the status. The old way would crash if the HTTP request failed, in trying to strsplit a nil value. --- scripts/bitcoinrpc-info.nse | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bitcoinrpc-info.nse b/scripts/bitcoinrpc-info.nse index 4b08e363d..0ad27b857 100644 --- a/scripts/bitcoinrpc-info.nse +++ b/scripts/bitcoinrpc-info.nse @@ -67,7 +67,7 @@ end function ServiceProxy:remote(req) local httpdata = http.post(self.host, self.port, self.path, self.options, nil, req) - if stdnse.strsplit(" ", httpdata["status-line"])[2] ~= "200" then + if httpdata.status ~= 200 then return end local body = httpdata["body"]