Minor patch

This commit is contained in:
Miroslav Stampar
2019-05-09 15:39:10 +02:00
parent 2f325e9bc5
commit 6bcf9987a6
2 changed files with 7 additions and 3 deletions

View File

@@ -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()