mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-29 04:53:48 +03:00
Fixes #1582
This commit is contained in:
parent
7517e64417
commit
d5e6be41db
|
@ -64,15 +64,19 @@ def pivotDumpTable(table, colList, count=None, blind=True):
|
|||
colList = filter(None, sorted(colList, key=lambda x: len(x) if x else MAX_INT))
|
||||
|
||||
if conf.pivotColumn:
|
||||
if any(re.search(r"(.+\.)?%s" % re.escape(conf.pivotColumn), _, re.I) for _ in colList):
|
||||
infoMsg = "using column '%s' as a pivot " % conf.pivotColumn
|
||||
infoMsg += "for retrieving row data"
|
||||
logger.info(infoMsg)
|
||||
for _ in colList:
|
||||
if re.search(r"(.+\.)?%s" % re.escape(conf.pivotColumn), _, re.I):
|
||||
infoMsg = "using column '%s' as a pivot " % conf.pivotColumn
|
||||
infoMsg += "for retrieving row data"
|
||||
logger.info(infoMsg)
|
||||
|
||||
validPivotValue = True
|
||||
colList.remove(conf.pivotColumn)
|
||||
colList.insert(0, conf.pivotColumn)
|
||||
else:
|
||||
colList.remove(_)
|
||||
colList.insert(0, _)
|
||||
|
||||
validPivotValue = True
|
||||
break
|
||||
|
||||
if not validPivotValue:
|
||||
warnMsg = "column '%s' not " % conf.pivotColumn
|
||||
warnMsg += "found in table '%s'" % table
|
||||
logger.warn(warnMsg)
|
||||
|
|
Loading…
Reference in New Issue
Block a user