mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-27 04:05:58 +00:00
Minor refactoring
This commit is contained in:
parent
db512c7603
commit
883bd2398b
4 changed files with 6 additions and 29 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue