From 48619d9ae126b9057b847ff872eb3cb987ec38f8 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 12 Oct 2015 10:05:49 +0200 Subject: [PATCH] Fixes #1464 --- sqlmap.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sqlmap.py b/sqlmap.py index d7bf52912..1fd6f47f7 100755 --- a/sqlmap.py +++ b/sqlmap.py @@ -77,7 +77,7 @@ def main(): errMsg = "your system does not properly handle non-ASCII paths. " errMsg += "Please move the sqlmap's directory to the other location" logger.error(errMsg) - exit() + raise SystemExit setPaths() @@ -122,7 +122,7 @@ def main(): except SqlmapBaseException as ex: errMsg = getSafeExString(ex) logger.critical(errMsg) - sys.exit(1) + raise SystemExit except KeyboardInterrupt: print @@ -142,6 +142,11 @@ def main(): errMsg = unhandledExceptionMessage() excMsg = traceback.format_exc() + if "No space left" in excMsg: + errMsg = "no space left on output device" + logger.error(errMsg) + raise SystemExit + for match in re.finditer(r'File "(.+?)", line', excMsg): file_ = match.group(1) file_ = os.path.relpath(file_, os.path.dirname(__file__))