maurosoria / dirsearch

Web path scanner
11.85k stars 2.3k forks source link

sre_constants.error: unbalanced parenthesis #49

Closed drego85 closed 6 years ago

drego85 commented 7 years ago

Hi, scanning the http://tt-karaj.ir site I get this error:

Target: http://tt-karaj.ir

[09:59:45] Starting: 
Traceback (most recent call last):
  File "dirsearch.py", line 40, in <module>
    main = Program()
  File "dirsearch.py", line 34, in __init__
    self.controller = Controller(self.script_path, self.arguments, self.output)
  File "/home/drego85/Scrivania/Tools/dirsearch/lib/controller/Controller.py", line 130, in __init__
    self.wait()
  File "/home/drego85/Scrivania/Tools/dirsearch/lib/controller/Controller.py", line 323, in wait
    self.fuzzer.start()
  File "/home/drego85/Scrivania/Tools/dirsearch/lib/core/Fuzzer.py", line 80, in start
    self.setupScanners()
  File "/home/drego85/Scrivania/Tools/dirsearch/lib/core/Fuzzer.py", line 56, in setupScanners
    self.defaultScanner = Scanner(self.requester, self.testFailPath, "")
  File "/home/drego85/Scrivania/Tools/dirsearch/lib/core/Scanner.py", line 44, in __init__
    self.setup()
  File "/home/drego85/Scrivania/Tools/dirsearch/lib/core/Scanner.py", line 61, in setup
    self.dynamicParser = DynamicContentParser(self.requester, firstPath, firstResponse.body, secondResponse.body)
  File "/home/drego85/Scrivania/Tools/dirsearch/thirdparty/sqlmap/DynamicContentParser.py", line 14, in __init__
    self.generateDynamicMarks(firstPage, secondPage)
  File "/home/drego85/Scrivania/Tools/dirsearch/thirdparty/sqlmap/DynamicContentParser.py", line 31, in generateDynamicMarks
    self.cleanPage = self.removeDynamicContent(firstPage, self.dynamicMarks)
  File "/home/drego85/Scrivania/Tools/dirsearch/thirdparty/sqlmap/DynamicContentParser.py", line 92, in removeDynamicContent
    page = re.sub(r'(?s)%s.+$' % prefix, prefix, str(page))
  File "/usr/lib/python3.4/re.py", line 179, in sub
    return _compile(pattern, flags).sub(repl, string, count)
  File "/usr/lib/python3.4/re.py", line 294, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/usr/lib/python3.4/sre_compile.py", line 568, in compile
    p = sre_parse.parse(p, flags)
  File "/usr/lib/python3.4/sre_parse.py", line 765, in parse
    raise error("unbalanced parenthesis")
sre_constants.error: unbalanced parenthesis
maurosoria commented 7 years ago

Can't resolve domain name. Maybe some regular expression escaping bug?

drego85 commented 7 years ago

Why you don't use tldextract module to determine the domain name?

exploitprotocol commented 7 years ago

I have noticed this bug when my scripts accidentally run dirsearch on Jenkins instance.

maurosoria commented 6 years ago

solved