mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 05:04:11 +03:00
Patch for an Issue #582
This commit is contained in:
parent
ab64d385d6
commit
02de2aee6d
|
@ -351,7 +351,8 @@ class Agent(object):
|
||||||
else:
|
else:
|
||||||
nulledCastedField = rootQuery.isnull.query % nulledCastedField
|
nulledCastedField = rootQuery.isnull.query % nulledCastedField
|
||||||
|
|
||||||
if conf.hexConvert or conf.binaryFields and field in conf.binaryFields.split(','):
|
kb.binaryField = conf.binaryFields and field in conf.binaryFields.split(',')
|
||||||
|
if conf.hexConvert or kb.binaryField:
|
||||||
nulledCastedField = self.hexConvertField(nulledCastedField)
|
nulledCastedField = self.hexConvertField(nulledCastedField)
|
||||||
|
|
||||||
return nulledCastedField
|
return nulledCastedField
|
||||||
|
|
|
@ -3478,18 +3478,19 @@ def decodeHexValue(value):
|
||||||
if value and isinstance(value, basestring) and len(value) % 2 == 0:
|
if value and isinstance(value, basestring) and len(value) % 2 == 0:
|
||||||
retVal = hexdecode(retVal)
|
retVal = hexdecode(retVal)
|
||||||
|
|
||||||
if Backend.isDbms(DBMS.MSSQL) and value.startswith("0x"):
|
if not kb.binaryField:
|
||||||
try:
|
if Backend.isDbms(DBMS.MSSQL) and value.startswith("0x"):
|
||||||
retVal = retVal.decode("utf-16-le")
|
try:
|
||||||
except UnicodeDecodeError:
|
retVal = retVal.decode("utf-16-le")
|
||||||
pass
|
except UnicodeDecodeError:
|
||||||
elif Backend.isDbms(DBMS.HSQLDB):
|
pass
|
||||||
try:
|
elif Backend.isDbms(DBMS.HSQLDB):
|
||||||
retVal = retVal.decode("utf-16-be")
|
try:
|
||||||
except UnicodeDecodeError:
|
retVal = retVal.decode("utf-16-be")
|
||||||
pass
|
except UnicodeDecodeError:
|
||||||
if not isinstance(retVal, unicode):
|
pass
|
||||||
retVal = getUnicode(retVal, "utf8")
|
if not isinstance(retVal, unicode):
|
||||||
|
retVal = getUnicode(retVal, "utf8")
|
||||||
|
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
|
|
|
@ -1572,6 +1572,7 @@ def _setKnowledgeBaseAttributes(flushAll=True):
|
||||||
kb.arch = None
|
kb.arch = None
|
||||||
kb.authHeader = None
|
kb.authHeader = None
|
||||||
kb.bannerFp = AttribDict()
|
kb.bannerFp = AttribDict()
|
||||||
|
kb.binaryField = False
|
||||||
|
|
||||||
kb.brute = AttribDict({"tables": [], "columns": []})
|
kb.brute = AttribDict({"tables": [], "columns": []})
|
||||||
kb.bruteMode = False
|
kb.bruteMode = False
|
||||||
|
|
Loading…
Reference in New Issue
Block a user