diff --git a/lib/core/common.py b/lib/core/common.py index 8f29e086a..4be6a9b81 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1034,7 +1034,10 @@ def dataToStdout(data, forceOutput=False, bold=False, contentType=None, status=C except UnicodeEncodeError: sys.stdout.write(re.sub(r"[^ -~]", '?', clearColors(data))) finally: - sys.stdout.flush() + try: + sys.stdout.flush() + except IOError: + raise SystemExit if multiThreadMode: logging._releaseLock() diff --git a/lib/core/settings.py b/lib/core/settings.py index 60442403b..c2dc69707 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -20,7 +20,7 @@ from thirdparty import six from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.6.12.0" +VERSION = "1.6.12.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) diff --git a/sqlmap.py b/sqlmap.py index 7c7e14ebd..43b0fee8f 100755 --- a/sqlmap.py +++ b/sqlmap.py @@ -250,7 +250,10 @@ def main(): raise SystemExit except KeyboardInterrupt: - print() + try: + print() + except IOError: + pass except EOFError: print()