Skip to content

Commit 374f38f

Browse files
committed
Minor patch of doctests for Windows machine
1 parent 95b69d2 commit 374f38f

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

lib/core/common.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5017,18 +5017,14 @@ def decloakToTemp(filename):
50175017
"""
50185018
Decloaks content of a given file to a temporary file with similar name and extension
50195019
5020-
>>> _ = decloakToTemp(os.path.join(paths.SQLMAP_SHELL_PATH, "stagers", "stager.asp_"))
5021-
>>> openFile(_, "rb", encoding=None).read().startswith(b'<%')
5020+
NOTE: using in-memory decloak() in docTests because of the "problem" on Windows platform
5021+
5022+
>>> decloak(os.path.join(paths.SQLMAP_SHELL_PATH, "stagers", "stager.asp_")).startswith(b'<%')
50225023
True
5023-
>>> os.remove(_)
5024-
>>> _ = decloakToTemp(os.path.join(paths.SQLMAP_SHELL_PATH, "backdoors", "backdoor.asp_"))
5025-
>>> openFile(_, "rb", encoding=None).read().startswith(b'<%')
5024+
>>> decloak(os.path.join(paths.SQLMAP_SHELL_PATH, "backdoors", "backdoor.asp_")).startswith(b'<%')
50265025
True
5027-
>>> os.remove(_)
5028-
>>> _ = decloakToTemp(os.path.join(paths.SQLMAP_UDF_PATH, "postgresql", "linux", "64", "11", "lib_postgresqludf_sys.so_"))
5029-
>>> b'sys_eval' in openFile(_, "rb", encoding=None).read()
5026+
>>> b'sys_eval' in decloak(os.path.join(paths.SQLMAP_UDF_PATH, "postgresql", "linux", "64", "11", "lib_postgresqludf_sys.so_"))
50305027
True
5031-
>>> os.remove(_)
50325028
"""
50335029

50345030
content = decloak(filename)

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from thirdparty.six import unichr as _unichr
2121

2222
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
23-
VERSION = "1.5.9.20"
23+
VERSION = "1.5.9.21"
2424
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2525
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2626
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

0 commit comments

Comments
 (0)