Skip to content

Commit 82e6bc6

Browse files
committed
Fixes #4026
1 parent ea0ec86 commit 82e6bc6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/core/option.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2477,6 +2477,13 @@ def _basicOptionValidation():
24772477
errMsg = "invalid regular expression '%s' ('%s')" % (conf.crawlExclude, getSafeExString(ex))
24782478
raise SqlmapSyntaxException(errMsg)
24792479

2480+
if conf.scope:
2481+
try:
2482+
re.compile(conf.scope)
2483+
except Exception as ex:
2484+
errMsg = "invalid regular expression '%s' ('%s')" % (conf.scope, getSafeExString(ex))
2485+
raise SqlmapSyntaxException(errMsg)
2486+
24802487
if conf.dumpTable and conf.dumpAll:
24812488
errMsg = "switch '--dump' is incompatible with switch '--dump-all'"
24822489
raise SqlmapSyntaxException(errMsg)

0 commit comments

Comments
 (0)