bug fix for --schema --technique=BST

This commit is contained in:
Miroslav Stampar 2012-02-24 14:12:19 +00:00
parent f94b91ad87
commit 9d6fd2e507
2 changed files with 12 additions and 4 deletions

View File

@ -960,6 +960,10 @@ def cleanQuery(query):
return upperQuery
def setPaths():
"""
Sets absolute paths for project directories and files
"""
# sqlmap paths
paths.SQLMAP_EXTRAS_PATH = os.path.join(paths.SQLMAP_ROOT_PATH, "extra")
paths.SQLMAP_PROCS_PATH = os.path.join(paths.SQLMAP_ROOT_PATH, "procs")
@ -1099,6 +1103,7 @@ def parseTargetUrl():
"""
Parse target url and set some attributes into the configuration singleton.
"""
if not conf.url:
return
@ -1157,9 +1162,12 @@ def parseTargetUrl():
conf.httpHeaders.append((HTTPHEADER.HOST, getHostHeader(conf.url)))
def expandAsteriskForColumns(expression):
# If the user provided an asterisk rather than the column(s)
# name, sqlmap will retrieve the columns itself and reprocess
# the SQL query string (expression)
"""
If the user provided an asterisk rather than the column(s)
name, sqlmap will retrieve the columns itself and reprocess
the SQL query string (expression)
"""
asterisk = re.search("^SELECT\s+\*\s+FROM\s+([\w\.\_]+)\s*", expression, re.I)
if asterisk:

View File

@ -1138,7 +1138,7 @@ class Enumeration:
table[safeSQLIdentificatorNaming(tbl, True)] = columns
kb.data.cachedColumns[safeSQLIdentificatorNaming(conf.db)] = table
if not kb.data.cachedColumns and isInferenceAvailable() and not conf.direct:
if safeSQLIdentificatorNaming(conf.db) not in kb.data.cachedColumns and isInferenceAvailable() and not conf.direct:
for tbl in tblList:
if conf.db is not None and len(kb.data.cachedColumns) > 0 \
and conf.db in kb.data.cachedColumns and tbl in \