Skip to content

Commit 6012ab1

Browse files
committed
better one for previous commit
1 parent af096b2 commit 6012ab1

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lib/techniques/brute/use.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def tableExists(tableFile, regex=None):
5454
count = [0]
5555
length = len(tables)
5656
threads = []
57+
items = set()
5758
tbllock = threading.Lock()
5859
iolock = threading.Lock()
5960
kb.threadContinue = True
@@ -75,9 +76,11 @@ def tableExistsThread():
7576

7677
iolock.acquire()
7778

78-
if result:
79+
if result and table.lower() not in items:
7980
retVal.append(table)
8081

82+
items.add(table.lower())
83+
8184
dataToSessionFile("[%s][%s][%s][TABLE_EXISTS][%s]\n" % (conf.url,\
8285
kb.injection.place, safeFormatString(conf.parameters[kb.injection.place]),\
8386
safeFormatString(fullTableName)))
@@ -152,12 +155,7 @@ def tableExistsThread():
152155
warnMsg = "no table found"
153156
logger.warn(warnMsg)
154157
else:
155-
items = set()
156158
for item in retVal:
157-
if item.lower() in items:
158-
continue
159-
else:
160-
items.add(item.lower())
161159
if not kb.data.cachedTables.has_key(conf.db):
162160
kb.data.cachedTables[conf.db] = [item]
163161
else:

0 commit comments

Comments
 (0)