mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-03 22:31:34 +00:00
implementation of switch --hex for 4 major DBMSes
This commit is contained in:
parent
77723a7aee
commit
bcf3255fe1
7 changed files with 108 additions and 53 deletions
|
|
@ -14,6 +14,7 @@ import traceback
|
|||
from lib.core.agent import agent
|
||||
from lib.core.common import Backend
|
||||
from lib.core.common import dataToStdout
|
||||
from lib.core.common import decodeHexValue
|
||||
from lib.core.common import decodeIntToUnicode
|
||||
from lib.core.common import filterControlChars
|
||||
from lib.core.common import getCharset
|
||||
|
|
@ -520,6 +521,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
|||
logger.info(infoMsg)
|
||||
|
||||
if finalValue is not None:
|
||||
finalValue = decodeHexValue(finalValue) if conf.hexConvert else finalValue
|
||||
conf.hashDB.write(expression, finalValue)
|
||||
else:
|
||||
conf.hashDB.write(expression, "%s%s" % (PARTIAL_VALUE_MARKER, partialValue))
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ from lib.core.bigarray import BigArray
|
|||
from lib.core.common import Backend
|
||||
from lib.core.common import calculateDeltaSeconds
|
||||
from lib.core.common import dataToStdout
|
||||
from lib.core.common import decodeHexValue
|
||||
from lib.core.common import extractRegexResult
|
||||
from lib.core.common import getUnicode
|
||||
from lib.core.common import incrementCounter
|
||||
|
|
@ -123,6 +124,8 @@ def __oneShotErrorUse(expression, field):
|
|||
retVal = output
|
||||
break
|
||||
|
||||
retVal = decodeHexValue(retVal) if conf.hexConvert else retVal
|
||||
|
||||
if isinstance(retVal, basestring):
|
||||
retVal = htmlunescape(retVal).replace("<br>", "\n")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue