mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 11:03:47 +03:00
bug fix for using --no-cast and --hex switches together
This commit is contained in:
parent
11c7cc5224
commit
775e424bf2
|
@ -278,25 +278,26 @@ class Agent:
|
||||||
@rtype: C{str}
|
@rtype: C{str}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
rootQuery = queries[Backend.getIdentifiedDbms()]
|
||||||
|
|
||||||
if field.startswith("(CASE") or field.startswith("(IIF") or conf.noCast:
|
if field.startswith("(CASE") or field.startswith("(IIF") or conf.noCast:
|
||||||
nulledCastedField = field
|
nulledCastedField = field
|
||||||
else:
|
else:
|
||||||
_ = queries[Backend.getIdentifiedDbms()]
|
nulledCastedField = rootQuery.cast.query % field
|
||||||
nulledCastedField = _.cast.query % field
|
|
||||||
if Backend.isDbms(DBMS.ACCESS):
|
if Backend.isDbms(DBMS.ACCESS):
|
||||||
nulledCastedField = _.isnull.query % (nulledCastedField, nulledCastedField)
|
nulledCastedField = rootQuery.isnull.query % (nulledCastedField, nulledCastedField)
|
||||||
else:
|
else:
|
||||||
nulledCastedField = _.isnull.query % nulledCastedField
|
nulledCastedField = rootQuery.isnull.query % nulledCastedField
|
||||||
|
|
||||||
if conf.hexConvert:
|
if conf.hexConvert:
|
||||||
if 'hex' in _:
|
if 'hex' in rootQuery:
|
||||||
nulledCastedField = _.hex.query % nulledCastedField
|
nulledCastedField = rootQuery.hex.query % nulledCastedField
|
||||||
else:
|
else:
|
||||||
warnMsg = "switch '--hex' is currently not supported on DBMS '%s'. " % Backend.getIdentifiedDbms()
|
warnMsg = "switch '--hex' is currently not supported on DBMS '%s'. " % Backend.getIdentifiedDbms()
|
||||||
warnMsg += "Going to switch it off"
|
warnMsg += "Going to switch it off"
|
||||||
singleTimeWarnMessage(warnMsg)
|
singleTimeWarnMessage(warnMsg)
|
||||||
|
|
||||||
conf.hexConvert = False
|
conf.hexConvert = False
|
||||||
|
|
||||||
return nulledCastedField
|
return nulledCastedField
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user