--exclude option not working.
e2002e opened this issue · 2 comments
e2002e commented
I am trying to use the -x option to exclude urls from the tests.
But it yields:
Traceback (most recent call last):
File "/usr/bin/wapiti", line 33, in <module>
sys.exit(load_entry_point('wapiti3==3.0.4', 'console_scripts', 'wapiti')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/wapitiCore/main/wapiti.py", line 1206, in wapiti_main
wap.browse()
File "/usr/lib/python3/dist-packages/wapitiCore/main/wapiti.py", line 328, in browse
for resource in explorer.explore(self._start_urls, self._excluded_urls):
File "/usr/lib/python3/dist-packages/wapitiCore/net/crawler.py", line 659, in explore
regexes.append(wildcard_translate(excluded_url))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/wapitiCore/net/crawler.py", line 95, in wildcard_translate
return re.compile(res + r'\Z(?ms)')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/re/__init__.py", line 227, in compile
return _compile(pattern, flags)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/re/__init__.py", line 294, in _compile
p = _compiler.compile(pattern, flags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/re/_compiler.py", line 745, in compile
p = _parser.parse(p, flags)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/re/_parser.py", line 989, in parse
p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/re/_parser.py", line 464, in _parse_sub
itemsappend(_parse(source, state, verbose, nested + 1,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/re/_parser.py", line 850, in _parse
raise source.error('global flags not at the start '
re.error: global flags not at the start of the expression at position 186
I'm on Kali linux with python3.11.9
devl00p commented
Interesting. Can you provide the options you specified ?
e2002e commented
I can't reproduce.
I am now running debian 12 and there is not this problem anymore.
I was beforehand on debian also and had this issue untill some point, but can't remember how I had fixed it. Anyway here the installation was straightforward with pip3 install wapiti3
.