mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 16:24:25 +03:00
better one for previous commit
This commit is contained in:
parent
af096b2c83
commit
6012ab1c46
|
@ -54,6 +54,7 @@ def tableExists(tableFile, regex=None):
|
||||||
count = [0]
|
count = [0]
|
||||||
length = len(tables)
|
length = len(tables)
|
||||||
threads = []
|
threads = []
|
||||||
|
items = set()
|
||||||
tbllock = threading.Lock()
|
tbllock = threading.Lock()
|
||||||
iolock = threading.Lock()
|
iolock = threading.Lock()
|
||||||
kb.threadContinue = True
|
kb.threadContinue = True
|
||||||
|
@ -75,9 +76,11 @@ def tableExists(tableFile, regex=None):
|
||||||
|
|
||||||
iolock.acquire()
|
iolock.acquire()
|
||||||
|
|
||||||
if result:
|
if result and table.lower() not in items:
|
||||||
retVal.append(table)
|
retVal.append(table)
|
||||||
|
|
||||||
|
items.add(table.lower())
|
||||||
|
|
||||||
dataToSessionFile("[%s][%s][%s][TABLE_EXISTS][%s]\n" % (conf.url,\
|
dataToSessionFile("[%s][%s][%s][TABLE_EXISTS][%s]\n" % (conf.url,\
|
||||||
kb.injection.place, safeFormatString(conf.parameters[kb.injection.place]),\
|
kb.injection.place, safeFormatString(conf.parameters[kb.injection.place]),\
|
||||||
safeFormatString(fullTableName)))
|
safeFormatString(fullTableName)))
|
||||||
|
@ -152,12 +155,7 @@ def tableExists(tableFile, regex=None):
|
||||||
warnMsg = "no table found"
|
warnMsg = "no table found"
|
||||||
logger.warn(warnMsg)
|
logger.warn(warnMsg)
|
||||||
else:
|
else:
|
||||||
items = set()
|
|
||||||
for item in retVal:
|
for item in retVal:
|
||||||
if item.lower() in items:
|
|
||||||
continue
|
|
||||||
else:
|
|
||||||
items.add(item.lower())
|
|
||||||
if not kb.data.cachedTables.has_key(conf.db):
|
if not kb.data.cachedTables.has_key(conf.db):
|
||||||
kb.data.cachedTables[conf.db] = [item]
|
kb.data.cachedTables[conf.db] = [item]
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user