Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a0dca74

Browse files
committed
Minor patch
1 parent 1f3a5b4 commit a0dca74

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

lib/core/common.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3580,6 +3580,8 @@ def openFile(filename, mode='r', encoding=UNICODE_ENCODING, errors="reversible",
35803580
35813581
>>> "openFile" in openFile(__file__).read()
35823582
True
3583+
>>> b"openFile" in openFile(__file__, "rb", None).read()
3584+
True
35833585
"""
35843586

35853587
if filename == STDIN_PIPE_DASH:
@@ -3589,7 +3591,7 @@ def openFile(filename, mode='r', encoding=UNICODE_ENCODING, errors="reversible",
35893591
return contextlib.closing(io.StringIO(readCachedFileContent(filename)))
35903592
else:
35913593
try:
3592-
return codecs.open(filename, mode, encoding, errors, buffering)
3594+
return codecs.open(filename, mode, encoding, errors, buffering and 'b' not in mode)
35933595
except IOError:
35943596
errMsg = "there has been a file opening error for filename '%s'. " % filename
35953597
errMsg += "Please check %s permissions on a file " % ("write" if mode and ('w' in mode or 'a' in mode or '+' in mode) else "read")

lib/core/settings.py

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

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.3.11.81"
21+
VERSION = "1.3.11.82"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
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)