1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

nse_check_globals cleanup

This commit is contained in:
patrik
2012-07-24 10:08:43 +00:00
parent f4e06ca3d7
commit 217b27bace
18 changed files with 48 additions and 17 deletions

View File

@@ -1,3 +1,6 @@
local io = require "io"
local nmap = require "nmap"
local string = require "string"
local shortport = require "shortport"
local sip = require "sip"
local stdnse = require "stdnse"
@@ -121,7 +124,7 @@ local useriterator = function(list)
end
f = io.open(f)
if ( not(f) ) then
return false, ("\n ERROR: Failed to open %s"):format(DEFAULT_ACCOUNTS)
return false, ("\n ERROR: Failed to open %s"):format(list)
end
return function()
for line in f:lines() do
@@ -171,7 +174,7 @@ Driver = {
self.session = sip.Session:new(self.host, self.port)
local status = self.session:connect()
if ( not(status) ) then
return false, brute.Error:new( "Couldn't connect to host: " .. err )
return false, brute.Error:new( "Couldn't connect to host" )
end
return true
end,
@@ -247,7 +250,7 @@ action = function(host, port)
local iterator = numiterator(minext, maxext, padding)
if users then
usernames, err = useriterator(usersfile)
local usernames, err = useriterator(usersfile)
if not usernames then
return err
end