mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 05:01:30 +00:00
bug fix (AttributeError: 'unicode' object has no attribute 'sort')
This commit is contained in:
@@ -1833,3 +1833,8 @@ def initTechnique(technique=None):
|
||||
warnMsg = "there is no injection data available for technique "
|
||||
warnMsg += "'%s'" % enumValueToNameLookup(PAYLOAD.TECHNIQUE, technique)
|
||||
logger.warn(warnMsg)
|
||||
|
||||
def arrayizeValue(value):
|
||||
if not isinstance(value, list):
|
||||
value = [value]
|
||||
return value
|
||||
|
||||
@@ -8,6 +8,7 @@ See the file 'doc/COPYING' for copying permission
|
||||
"""
|
||||
|
||||
from lib.core.agent import agent
|
||||
from lib.core.common import arrayizeValue
|
||||
from lib.core.common import getRange
|
||||
from lib.core.common import isNumPosStrValue
|
||||
from lib.core.data import conf
|
||||
@@ -63,7 +64,7 @@ class Enumeration(GenericEnumeration):
|
||||
value = inject.getValue(query, blind=False, error=False)
|
||||
|
||||
if value:
|
||||
kb.data.cachedTables[db] = value
|
||||
kb.data.cachedTables[db] = arrayizeValue(value)
|
||||
|
||||
if not kb.data.cachedTables and not conf.direct:
|
||||
for db in dbs:
|
||||
|
||||
@@ -11,6 +11,7 @@ import re
|
||||
import time
|
||||
|
||||
from lib.core.agent import agent
|
||||
from lib.core.common import arrayizeValue
|
||||
from lib.core.common import dataToStdout
|
||||
from lib.core.common import getRange
|
||||
from lib.core.common import getCompiledRegex
|
||||
@@ -158,7 +159,7 @@ class Enumeration:
|
||||
value = inject.getValue(query, blind=False, error=False)
|
||||
|
||||
if value:
|
||||
kb.data.cachedUsers = value
|
||||
kb.data.cachedUsers = arrayizeValue(value)
|
||||
|
||||
if not kb.data.cachedUsers and not conf.direct:
|
||||
infoMsg = "fetching number of database users"
|
||||
@@ -684,10 +685,7 @@ class Enumeration:
|
||||
value = inject.getValue(query, blind=False, error=False)
|
||||
|
||||
if value:
|
||||
if isinstance(value, basestring):
|
||||
kb.data.cachedDbs = [value]
|
||||
else:
|
||||
kb.data.cachedDbs = value
|
||||
kb.data.cachedDbs = arrayizeValue(value)
|
||||
|
||||
if not kb.data.cachedDbs and not conf.direct:
|
||||
infoMsg = "fetching number of databases"
|
||||
|
||||
Reference in New Issue
Block a user