Minor refactoring

This commit is contained in:
Miroslav Stampar 2025-12-31 10:21:53 +01:00
parent db512c7603
commit 883bd2398b
4 changed files with 6 additions and 29 deletions

View file

@ -138,29 +138,6 @@ def dejsonize(data):
return json.loads(data)
def rot13(data):
"""
Returns ROT13 encoded/decoded text
>>> rot13('foobar was here!!')
'sbbone jnf urer!!'
>>> rot13('sbbone jnf urer!!')
'foobar was here!!'
>>> rot13(b'foobar was here!!')
'sbbone jnf urer!!'
"""
retVal = ""
alphabit = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
if isinstance(data, six.binary_type):
data = getText(data)
for char in data:
retVal += alphabit[alphabit.index(char) + 13] if char in alphabit else char
return retVal
def decodeHex(value, binary=True):
"""
Returns a decoded representation of the provided hexadecimal value

View file

@ -19,7 +19,7 @@ from lib.core.enums import OS
from thirdparty import six
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.9.12.51"
VERSION = "1.9.12.52"
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)