mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-06-28 17:03:10 +03:00
Use getPageTextWordsSet() also in --common-columns
This commit is contained in:
parent
6b2f44de14
commit
28ef61b997
|
@ -36,11 +36,8 @@ from lib.core.threads import getCurrentThreadData
|
||||||
from lib.core.threads import runThreads
|
from lib.core.threads import runThreads
|
||||||
from lib.request import inject
|
from lib.request import inject
|
||||||
|
|
||||||
def tableExists(tableFile, regex=None):
|
def __addPageTextWords():
|
||||||
tables = getFileItems(tableFile, lowercase=Backend.getIdentifiedDbms() in (DBMS.ACCESS), unique=True)
|
wordsList = []
|
||||||
|
|
||||||
infoMsg = "checking table existence using items from '%s'" % tableFile
|
|
||||||
logger.info(infoMsg)
|
|
||||||
|
|
||||||
infoMsg = "adding words used on web page to the check list"
|
infoMsg = "adding words used on web page to the check list"
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
@ -49,9 +46,18 @@ def tableExists(tableFile, regex=None):
|
||||||
for word in pageWords:
|
for word in pageWords:
|
||||||
word = word.lower()
|
word = word.lower()
|
||||||
|
|
||||||
if len(word) > 2 and not word[0].isdigit() and word not in tables:
|
if len(word) > 2 and not word[0].isdigit() and word not in wordsList:
|
||||||
tables.append(word)
|
wordsList.append(word)
|
||||||
|
|
||||||
|
return wordsList
|
||||||
|
|
||||||
|
def tableExists(tableFile, regex=None):
|
||||||
|
tables = getFileItems(tableFile, lowercase=Backend.getIdentifiedDbms() in (DBMS.ACCESS), unique=True)
|
||||||
|
|
||||||
|
infoMsg = "checking table existence using items from '%s'" % tableFile
|
||||||
|
logger.info(infoMsg)
|
||||||
|
|
||||||
|
tables.extend(__addPageTextWords())
|
||||||
tables = filterListValue(tables, regex)
|
tables = filterListValue(tables, regex)
|
||||||
|
|
||||||
threadData = getCurrentThreadData()
|
threadData = getCurrentThreadData()
|
||||||
|
@ -84,7 +90,6 @@ def tableExists(tableFile, regex=None):
|
||||||
|
|
||||||
if result and table.lower() not in threadData.shared.unique:
|
if result and table.lower() not in threadData.shared.unique:
|
||||||
threadData.shared.outputs.append(table)
|
threadData.shared.outputs.append(table)
|
||||||
|
|
||||||
threadData.shared.unique.add(table.lower())
|
threadData.shared.unique.add(table.lower())
|
||||||
|
|
||||||
dataToSessionFile("[%s][%s][%s][TABLE_EXISTS][%s]\n" % (conf.url,\
|
dataToSessionFile("[%s][%s][%s][TABLE_EXISTS][%s]\n" % (conf.url,\
|
||||||
|
@ -130,7 +135,11 @@ def columnExists(columnFile, regex=None):
|
||||||
errMsg = "missing table parameter"
|
errMsg = "missing table parameter"
|
||||||
raise sqlmapMissingMandatoryOptionException, errMsg
|
raise sqlmapMissingMandatoryOptionException, errMsg
|
||||||
|
|
||||||
|
infoMsg = "checking column existence using items from '%s'" % columnFile
|
||||||
|
logger.info(infoMsg)
|
||||||
|
|
||||||
columns = getFileItems(columnFile, unique=True)
|
columns = getFileItems(columnFile, unique=True)
|
||||||
|
columns.extend(__addPageTextWords())
|
||||||
columns = filterListValue(columns, regex)
|
columns = filterListValue(columns, regex)
|
||||||
|
|
||||||
if conf.db and METADB_SUFFIX not in conf.db:
|
if conf.db and METADB_SUFFIX not in conf.db:
|
||||||
|
@ -139,9 +148,6 @@ def columnExists(columnFile, regex=None):
|
||||||
table = conf.tbl
|
table = conf.tbl
|
||||||
table = safeSQLIdentificatorNaming(table, True)
|
table = safeSQLIdentificatorNaming(table, True)
|
||||||
|
|
||||||
infoMsg = "checking column existence using items from '%s'" % columnFile
|
|
||||||
logger.info(infoMsg)
|
|
||||||
|
|
||||||
kb.threadContinue = True
|
kb.threadContinue = True
|
||||||
kb.bruteMode = True
|
kb.bruteMode = True
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user