Minor update of doctests

This commit is contained in:
Miroslav Štampar 2026-06-12 10:12:19 +02:00
parent 8e48af61b7
commit b4a6d25795
5 changed files with 22 additions and 5 deletions

View file

@ -1229,6 +1229,9 @@ class Agent(object):
def removePayloadDelimiters(self, value):
"""
Removes payload delimiters from inside the input string
>>> agent.removePayloadDelimiters(agent.addPayloadDelimiters("1 AND 1=1")) == "1 AND 1=1"
True
"""
return value.replace(PAYLOAD_DELIMITER, "") if value else value
@ -1236,6 +1239,9 @@ class Agent(object):
def extractPayload(self, value):
"""
Extracts payload from inside of the input string
>>> agent.extractPayload("prefix" + agent.addPayloadDelimiters("1 AND 1=1") + "suffix") == "1 AND 1=1"
True
"""
_ = re.escape(PAYLOAD_DELIMITER)

View file

@ -4122,6 +4122,9 @@ def intersect(containerA, containerB, lowerCase=False):
def decodeStringEscape(value):
"""
Decodes escaped string values (e.g. "\\t" -> "\t")
>>> decodeStringEscape("a" + chr(92) + "tb") == "a" + chr(9) + "b"
True
"""
retVal = value
@ -4136,6 +4139,9 @@ def decodeStringEscape(value):
def encodeStringEscape(value):
"""
Encodes escaped string values (e.g. "\t" -> "\\t")
>>> encodeStringEscape("a" + chr(9) + "b") == "a" + chr(92) + "tb"
True
"""
retVal = value

View file

@ -20,7 +20,7 @@ from lib.core.enums import OS
from thirdparty import six
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.10.6.83"
VERSION = "1.10.6.84"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)