diff --git a/lib/controller/controller.py b/lib/controller/controller.py index f7610299e..c1a4f393d 100644 --- a/lib/controller/controller.py +++ b/lib/controller/controller.py @@ -598,14 +598,14 @@ def start(): except SqlmapSilentQuitException: raise - except SqlmapBaseException, e: - e = getUnicode(e) + except SqlmapBaseException, ex: + errMsg = getUnicode(ex.message) if conf.multipleTargets: - e += ", skipping to the next %s" % ("form" if conf.forms else "URL") - logger.error(e) + errMsg += ", skipping to the next %s" % ("form" if conf.forms else "URL") + logger.error(errMsg) else: - logger.critical(e) + logger.critical(errMsg) return False finally: diff --git a/sqlmap.py b/sqlmap.py index 38f9f9199..21f3d1727 100755 --- a/sqlmap.py +++ b/sqlmap.py @@ -101,9 +101,9 @@ def main(): except (SqlmapSilentQuitException, bdb.BdbQuit): pass - except SqlmapBaseException, e: - e = getUnicode(e) - logger.critical(e) + except SqlmapBaseException, ex: + errMsg = getUnicode(ex.message) + logger.critical(errMsg) sys.exit(1) except KeyboardInterrupt: