From d3c6cf193231f8a04b13c53d52d7d37b17b2e94c Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 30 Dec 2014 14:14:47 +0000 Subject: [PATCH] Patch for an Issue #1079 --- lib/core/option.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/core/option.py b/lib/core/option.py index 2db7d3d78..fd3a8c21b 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -2187,6 +2187,13 @@ def _basicOptionValidation(): errMsg = "option '--regexp' is incompatible with switch '--null-connection'" raise SqlmapSyntaxException(errMsg) + if conf.regexp: + try: + re.compile(conf.regexp) + except re.error, ex: + errMsg = "invalid regular expression '%s' ('%s')" % (conf.regexp, ex) + raise SqlmapSyntaxException(errMsg) + if conf.dumpTable and conf.dumpAll: errMsg = "switch '--dump' is incompatible with switch '--dump-all'" raise SqlmapSyntaxException(errMsg)