mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
minor update regarding DNS data retrieval task
This commit is contained in:
@@ -244,8 +244,28 @@ class Agent:
|
||||
return payload
|
||||
|
||||
def getComment(self, request):
|
||||
"""
|
||||
Returns comment form for the given request
|
||||
"""
|
||||
|
||||
return request.comment if "comment" in request else ""
|
||||
|
||||
def hexConvertField(self, field):
|
||||
"""
|
||||
Returns hex converted field string
|
||||
"""
|
||||
|
||||
rootQuery = queries[Backend.getIdentifiedDbms()]
|
||||
hexField = field
|
||||
|
||||
if 'hex' in rootQuery:
|
||||
hexField = rootQuery.hex.query % field
|
||||
else:
|
||||
warnMsg = "switch '--hex' is currently not supported on DBMS '%s'. " % Backend.getIdentifiedDbms()
|
||||
singleTimeWarnMessage(warnMsg)
|
||||
|
||||
return hexField
|
||||
|
||||
def nullAndCastField(self, field):
|
||||
"""
|
||||
Take in input a field string and return its processed nulled and
|
||||
@@ -288,14 +308,7 @@ class Agent:
|
||||
nulledCastedField = rootQuery.isnull.query % nulledCastedField
|
||||
|
||||
if conf.hexConvert:
|
||||
if 'hex' in rootQuery:
|
||||
nulledCastedField = rootQuery.hex.query % nulledCastedField
|
||||
else:
|
||||
warnMsg = "switch '--hex' is currently not supported on DBMS '%s'. " % Backend.getIdentifiedDbms()
|
||||
warnMsg += "Going to switch it off"
|
||||
singleTimeWarnMessage(warnMsg)
|
||||
|
||||
conf.hexConvert = False
|
||||
nulledCastedField = hexConvertField(nulledCastedField)
|
||||
|
||||
return nulledCastedField
|
||||
|
||||
|
||||
Reference in New Issue
Block a user