From 6bcf9987a6b368a0c4cc33e748a6310ae6e8bf62 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 9 May 2019 15:39:10 +0200 Subject: [PATCH] Minor patch --- lib/core/settings.py | 2 +- sqlmap.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index 53cd90554..0fd37e98d 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty import six # sqlmap version (...) -VERSION = "1.3.5.70" +VERSION = "1.3.5.71" 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 c186c48f4..95e4914d6 100755 --- a/sqlmap.py +++ b/sqlmap.py @@ -397,8 +397,12 @@ def main(): conf.hashDB.flush(True) if conf.get("harFile"): - with openFile(conf.harFile, "w+b") as f: - json.dump(conf.httpCollector.obtain(), fp=f, indent=4, separators=(',', ': ')) + try: + with openFile(conf.harFile, "w+b") as f: + json.dump(conf.httpCollector.obtain(), fp=f, indent=4, separators=(',', ': ')) + except SqlmapBaseException as ex: + errMsg = getSafeExString(ex) + logger.critical(errMsg) if conf.get("api"): conf.databaseCursor.disconnect()