From 4cd3813f683a8903ab392122785bc512ada280ea Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 16 Feb 2016 09:15:57 +0100 Subject: [PATCH] Patch to include traceback into the sqlmapapi based unhandled exception messages --- sqlmap.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sqlmap.py b/sqlmap.py index a1a38d7ae..6b474b038 100755 --- a/sqlmap.py +++ b/sqlmap.py @@ -195,10 +195,14 @@ def main(): errMsg = maskSensitiveData(errMsg) excMsg = maskSensitiveData(excMsg) - logger.critical(errMsg) - kb.stickyLevel = logging.CRITICAL - dataToStdout(excMsg) - createGithubIssue(errMsg, excMsg) + if hasattr(conf, "api"): + logger.critical("%s\n%s" % (errMsg, excMsg)) + else: + logger.critical(errMsg) + kb.stickyLevel = logging.CRITICAL + dataToStdout(excMsg) + createGithubIssue(errMsg, excMsg) + except KeyboardInterrupt: pass