mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 06:50:14 +00:00
Minor update of doctests
This commit is contained in:
parent
8e48af61b7
commit
b4a6d25795
5 changed files with 22 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue