mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
minor update
This commit is contained in:
parent
503988887c
commit
886aa22efc
|
@ -309,13 +309,14 @@ def unionUse(expression, unpack=True, dump=False):
|
||||||
if isNoneValue(items):
|
if isNoneValue(items):
|
||||||
continue
|
continue
|
||||||
kb.locks.value.acquire()
|
kb.locks.value.acquire()
|
||||||
threadData.shared.value.append(unArrayizeValue(items))
|
for item in items:
|
||||||
|
threadData.shared.value.append(item)
|
||||||
kb.locks.value.release()
|
kb.locks.value.release()
|
||||||
else:
|
else:
|
||||||
items = output.replace(kb.chars.start, "").replace(kb.chars.stop, "").split(kb.chars.delimiter)
|
items = output.replace(kb.chars.start, "").replace(kb.chars.stop, "").split(kb.chars.delimiter)
|
||||||
|
|
||||||
if conf.verbose == 1:
|
if conf.verbose == 1:
|
||||||
status = "[%s] [INFO] %s: %s" % (time.strftime("%X"), "resumed" if threadData.resumed else "retrieved", safecharencode(",".join(map(lambda x: "\"%s\"" % x, arrayizeValue(items)))))
|
status = "[%s] [INFO] %s: %s" % (time.strftime("%X"), "resumed" if threadData.resumed else "retrieved", safecharencode(",".join("\"%s\"" % _ for _ in unArrayizeValue(items))))
|
||||||
|
|
||||||
if len(status) > width:
|
if len(status) > width:
|
||||||
status = "%s..." % status[:width - 3]
|
status = "%s..." % status[:width - 3]
|
||||||
|
|
|
@ -121,12 +121,12 @@ class Enumeration(GenericEnumeration):
|
||||||
|
|
||||||
for query in (rootQuery.blind.count, rootQuery.blind.count2, rootQuery.blind.count3):
|
for query in (rootQuery.blind.count, rootQuery.blind.count2, rootQuery.blind.count3):
|
||||||
_ = query.replace("%s", db)
|
_ = query.replace("%s", db)
|
||||||
count = inject.getValue(_, inband=False, error=False, charsetType=CHARSET_TYPE.DIGITS)
|
count = inject.getValue(_, inband=False, error=False, expected=EXPECTED.INT, charsetType=CHARSET_TYPE.DIGITS)
|
||||||
if not isNoneValue(count):
|
if not isNoneValue(count):
|
||||||
break
|
break
|
||||||
|
|
||||||
if not isNumPosStrValue(count):
|
if not isNumPosStrValue(count):
|
||||||
if count != "0":
|
if count != 0:
|
||||||
warnMsg = "unable to retrieve the number of "
|
warnMsg = "unable to retrieve the number of "
|
||||||
warnMsg += "tables for database '%s'" % db
|
warnMsg += "tables for database '%s'" % db
|
||||||
logger.warn(warnMsg)
|
logger.warn(warnMsg)
|
||||||
|
|
|
@ -1369,11 +1369,14 @@ class Enumeration:
|
||||||
validColumnList = False
|
validColumnList = False
|
||||||
validPivotValue = False
|
validPivotValue = False
|
||||||
|
|
||||||
if not count:
|
if count is None:
|
||||||
query = dumpNode.count % table
|
query = dumpNode.count % table
|
||||||
count = inject.getValue(query, inband=False, error=False) if blind else inject.getValue(query, blind=False)
|
count = inject.getValue(query, inband=False, error=False, expected=EXPECTED.INT, charsetType=CHARSET_TYPE.DIGITS) if blind else inject.getValue(query, blind=False, expected=EXPECTED.INT)
|
||||||
|
|
||||||
if count == "0":
|
if isinstance(count, basestring) and count.isdigit():
|
||||||
|
count = int(count)
|
||||||
|
|
||||||
|
if count == 0:
|
||||||
infoMsg = "table '%s' appears to be empty" % unsafeSQLIdentificatorNaming(table)
|
infoMsg = "table '%s' appears to be empty" % unsafeSQLIdentificatorNaming(table)
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
|
@ -1400,9 +1403,9 @@ class Enumeration:
|
||||||
query = dumpNode.count2 % (column, table)
|
query = dumpNode.count2 % (column, table)
|
||||||
|
|
||||||
if blind:
|
if blind:
|
||||||
value = inject.getValue(query, inband=False, error=False)
|
value = inject.getValue(query, inband=False, error=False, expected=EXPECTED.INT, charsetType=CHARSET_TYPE.DIGITS)
|
||||||
else:
|
else:
|
||||||
value = inject.getValue(query, blind=False)
|
value = inject.getValue(query, blind=False, expected=EXPECTED.INT)
|
||||||
|
|
||||||
if isNumPosStrValue(value):
|
if isNumPosStrValue(value):
|
||||||
validColumnList = True
|
validColumnList = True
|
||||||
|
@ -1424,14 +1427,14 @@ class Enumeration:
|
||||||
|
|
||||||
if not validPivotValue:
|
if not validPivotValue:
|
||||||
warnMsg = "no proper pivot column provided (with unique values)."
|
warnMsg = "no proper pivot column provided (with unique values)."
|
||||||
warnMsg += " It's not possible to retrieve all rows."
|
warnMsg += " It won't be possible to retrieve all rows"
|
||||||
logger.warn(warnMsg)
|
logger.warn(warnMsg)
|
||||||
|
|
||||||
pivotValue = " "
|
pivotValue = " "
|
||||||
breakRetrieval = False
|
breakRetrieval = False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
for i in xrange(int(count)):
|
for i in xrange(count):
|
||||||
if breakRetrieval:
|
if breakRetrieval:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user