From 6012ab1c46abc2df3f486e41fa27a14278849846 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sun, 10 Apr 2011 21:52:08 +0000 Subject: [PATCH] better one for previous commit --- lib/techniques/brute/use.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/techniques/brute/use.py b/lib/techniques/brute/use.py index afb465ace..34b942f3f 100644 --- a/lib/techniques/brute/use.py +++ b/lib/techniques/brute/use.py @@ -54,6 +54,7 @@ def tableExists(tableFile, regex=None): count = [0] length = len(tables) threads = [] + items = set() tbllock = threading.Lock() iolock = threading.Lock() kb.threadContinue = True @@ -75,9 +76,11 @@ def tableExists(tableFile, regex=None): iolock.acquire() - if result: + if result and table.lower() not in items: retVal.append(table) + items.add(table.lower()) + dataToSessionFile("[%s][%s][%s][TABLE_EXISTS][%s]\n" % (conf.url,\ kb.injection.place, safeFormatString(conf.parameters[kb.injection.place]),\ safeFormatString(fullTableName))) @@ -152,12 +155,7 @@ def tableExists(tableFile, regex=None): warnMsg = "no table found" logger.warn(warnMsg) else: - items = set() for item in retVal: - if item.lower() in items: - continue - else: - items.add(item.lower()) if not kb.data.cachedTables.has_key(conf.db): kb.data.cachedTables[conf.db] = [item] else: