diff --git a/lib/core/option.py b/lib/core/option.py index c8af249a0..72d345e42 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -942,7 +942,7 @@ def _setTamperingFunctions(): try: module = __import__(filename[:-3]) - except ImportError, msg: + except (ImportError, SyntaxError), msg: raise SqlmapSyntaxException("cannot import tamper script '%s' (%s)" % (filename[:-3], msg)) priority = PRIORITY.NORMAL if not hasattr(module, '__priority__') else module.__priority__