From 5a18633b33101ed33b55c82f1b9115c392bb9b6c Mon Sep 17 00:00:00 2001 From: jah Date: Fri, 17 Jul 2009 22:34:27 +0000 Subject: [PATCH] Fix the indexing of Globals - found with the help of strict.lua --- scripts/smb-brute.nse | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/smb-brute.nse b/scripts/smb-brute.nse index b1978eb22..c8c99bf5f 100644 --- a/scripts/smb-brute.nse +++ b/scripts/smb-brute.nse @@ -175,9 +175,10 @@ local function get_random_string(length, set) local str = "" -- Seed the random number, if we haven't already - if(random_set == false) then + if not nmap.registry.smbbrute or not nmap.registry.smbbrute.seeded then math.randomseed(os.time()) - random_set = true + nmap.registry.smbbrute = {} + nmap.registry.smbbrute.seeded = true end for i = 1, length, 1 do