mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 05:04:11 +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
|
||||
|
||||
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:
|
||||
|
|
|
@ -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 \
|
||||
|
|
Loading…
Reference in New Issue
Block a user