mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 04:31:30 +00:00
Minor patches
This commit is contained in:
@@ -154,7 +154,7 @@ def rot13(data):
|
||||
|
||||
def decodeHex(value, binary=True):
|
||||
"""
|
||||
Returns a decoded representation of provided hexadecimal value
|
||||
Returns a decoded representation of the provided hexadecimal value
|
||||
|
||||
>>> decodeHex("313233") == b"123"
|
||||
True
|
||||
@@ -182,7 +182,7 @@ def decodeHex(value, binary=True):
|
||||
|
||||
def encodeHex(value, binary=True):
|
||||
"""
|
||||
Returns a encoded representation of provided string value
|
||||
Returns an encoded representation of the provided value
|
||||
|
||||
>>> encodeHex(b"123") == b"313233"
|
||||
True
|
||||
@@ -251,7 +251,7 @@ def decodeBase64(value, binary=True, encoding=None):
|
||||
|
||||
def encodeBase64(value, binary=True, encoding=None, padding=True, safe=False):
|
||||
"""
|
||||
Returns a decoded representation of provided Base64 value
|
||||
Returns a Base64 encoded representation of the provided value
|
||||
|
||||
>>> encodeBase64(b"123") == b"MTIz"
|
||||
True
|
||||
|
||||
@@ -939,8 +939,8 @@ def _setPreprocessFunctions():
|
||||
handle, filename = tempfile.mkstemp(prefix=MKSTEMP_PREFIX.PREPROCESS, suffix=".py")
|
||||
os.close(handle)
|
||||
|
||||
openFile(filename, "w+b").write("#!/usr/bin/env\n\ndef preprocess(req):\n pass\n")
|
||||
openFile(os.path.join(os.path.dirname(filename), "__init__.py"), "w+b").write("pass")
|
||||
openFile(filename, "w+").write("#!/usr/bin/env\n\ndef preprocess(req):\n pass\n")
|
||||
openFile(os.path.join(os.path.dirname(filename), "__init__.py"), "w+").write("pass")
|
||||
|
||||
errMsg = "function 'preprocess(req)' "
|
||||
errMsg += "in preprocess script '%s' " % script
|
||||
|
||||
@@ -19,7 +19,7 @@ from lib.core.enums import OS
|
||||
from thirdparty import six
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.9.11.0"
|
||||
VERSION = "1.9.11.1"
|
||||
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)
|
||||
|
||||
@@ -110,7 +110,7 @@ def update():
|
||||
|
||||
filepath = os.path.join(paths.SQLMAP_ROOT_PATH, "lib", "core", "settings.py")
|
||||
if os.path.isfile(filepath):
|
||||
with openFile(filepath, "rb") as f:
|
||||
with openFile(filepath, "r") as f:
|
||||
version = re.search(r"(?m)^VERSION\s*=\s*['\"]([^'\"]+)", f.read()).group(1)
|
||||
logger.info("updated to the latest version '%s#dev'" % version)
|
||||
success = True
|
||||
|
||||
Reference in New Issue
Block a user