mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 13:14:13 +03:00
bug fix for --schema --technique=BST
This commit is contained in:
parent
f94b91ad87
commit
9d6fd2e507
|
@ -960,6 +960,10 @@ def cleanQuery(query):
|
||||||
return upperQuery
|
return upperQuery
|
||||||
|
|
||||||
def setPaths():
|
def setPaths():
|
||||||
|
"""
|
||||||
|
Sets absolute paths for project directories and files
|
||||||
|
"""
|
||||||
|
|
||||||
# sqlmap paths
|
# sqlmap paths
|
||||||
paths.SQLMAP_EXTRAS_PATH = os.path.join(paths.SQLMAP_ROOT_PATH, "extra")
|
paths.SQLMAP_EXTRAS_PATH = os.path.join(paths.SQLMAP_ROOT_PATH, "extra")
|
||||||
paths.SQLMAP_PROCS_PATH = os.path.join(paths.SQLMAP_ROOT_PATH, "procs")
|
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.
|
Parse target url and set some attributes into the configuration singleton.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if not conf.url:
|
if not conf.url:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -1157,9 +1162,12 @@ def parseTargetUrl():
|
||||||
conf.httpHeaders.append((HTTPHEADER.HOST, getHostHeader(conf.url)))
|
conf.httpHeaders.append((HTTPHEADER.HOST, getHostHeader(conf.url)))
|
||||||
|
|
||||||
def expandAsteriskForColumns(expression):
|
def expandAsteriskForColumns(expression):
|
||||||
# If the user provided an asterisk rather than the column(s)
|
"""
|
||||||
# name, sqlmap will retrieve the columns itself and reprocess
|
If the user provided an asterisk rather than the column(s)
|
||||||
# the SQL query string (expression)
|
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)
|
asterisk = re.search("^SELECT\s+\*\s+FROM\s+([\w\.\_]+)\s*", expression, re.I)
|
||||||
|
|
||||||
if asterisk:
|
if asterisk:
|
||||||
|
|
|
@ -1138,7 +1138,7 @@ class Enumeration:
|
||||||
table[safeSQLIdentificatorNaming(tbl, True)] = columns
|
table[safeSQLIdentificatorNaming(tbl, True)] = columns
|
||||||
kb.data.cachedColumns[safeSQLIdentificatorNaming(conf.db)] = table
|
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:
|
for tbl in tblList:
|
||||||
if conf.db is not None and len(kb.data.cachedColumns) > 0 \
|
if conf.db is not None and len(kb.data.cachedColumns) > 0 \
|
||||||
and conf.db in kb.data.cachedColumns and tbl in \
|
and conf.db in kb.data.cachedColumns and tbl in \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user