From 8d1e1ea474f5b469e86525cee8ab0e98dcc3d1be Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 12 Nov 2015 16:58:34 +0100 Subject: [PATCH] Patch for an Issue #1532 --- sqlmap.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sqlmap.py b/sqlmap.py index 1fd6f47f7..4a0e1ff5a 100755 --- a/sqlmap.py +++ b/sqlmap.py @@ -147,6 +147,13 @@ def main(): logger.error(errMsg) raise SystemExit + elif "bad marshal data (unknown type code)" in excMsg: + match = re.search(r"\s*(.+)\s+ValueError", excMsg) + errMsg = "one of your .pyc files are corrupted%s" % (" ('%s')" % match.group(1) if match else "") + errMsg += ". Please delete .pyc files on your system to fix the problem" + 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__))