diff --git a/scripts/bitcoinrpc-info.nse b/scripts/bitcoinrpc-info.nse index 0ad27b857..0b1c35a73 100644 --- a/scripts/bitcoinrpc-info.nse +++ b/scripts/bitcoinrpc-info.nse @@ -67,11 +67,9 @@ end function ServiceProxy:remote(req) local httpdata = http.post(self.host, self.port, self.path, self.options, nil, req) - if httpdata.status ~= 200 then - return + if httpdata.status == 200 then + return httpdata.body end - local body = httpdata["body"] - return body end function ServiceProxy:call(method, args)