From 4530194599c8b5d4cf127e371034481e6a241c80 Mon Sep 17 00:00:00 2001 From: joao Date: Wed, 15 Jul 2009 21:29:41 +0000 Subject: [PATCH] Fix global to local variables --- scripts/pop3-brute.nse | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/pop3-brute.nse b/scripts/pop3-brute.nse index d4882103e..129dd0d7b 100644 --- a/scripts/pop3-brute.nse +++ b/scripts/pop3-brute.nse @@ -47,7 +47,7 @@ action = function(host, port) local socket = nmap.new_socket() local opts = {timeout=10000, recv_before=true} - socket, nothing, bopt, line = comm.tryssl(host, port, "" , opts) + local socket, nothing, bopt, line = comm.tryssl(host, port, "" , opts) if not socket then return end -- no connection if not stat(line) then return end -- no pop-connection @@ -59,6 +59,7 @@ action = function(host, port) end local getUser + local _ status, getUser = unpwdb.usernames() if (not status) then return end @@ -85,10 +86,10 @@ action = function(host, port) elseif (perror == pop3.err.userError) then currPw = nil else - socstatus = socket:connect(host.ip, port.number, bopt) + local socstatus = socket:connect(host.ip, port.number, bopt) if not socstatus then return - else recvstatus, line = socket:receive() + else _, line = socket:receive() if not stat(line) then return end -- no connection end end