Traceback (most recent call last):
File "/home/anon/python-tools/XSStrike/xsstrike.py", line 174, in
scan(target, paramData, encoding, headers, delay, timeout, skipDOM, skip)
File "/home/anon/python-tools/XSStrike/modes/scan.py", line 81, in scan
vectors = generator(occurences, response.text)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anon/python-tools/XSStrike/core/generator.py", line 136, in generator
closer = jsContexter(script)
^^^^^^^^^^^^^^^^^^^
File "/home/anon/python-tools/XSStrike/core/jsContexter.py", line 11, in jsContexter
pre = re.sub(r'(?s){.?}|(?s)(.?)|(?s)".?"|(?s)'.?'', '', pre)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/re/init.py", line 185, in sub
return _compile(pattern, flags).sub(repl, string, count)
^^^^^^^^^^^^^^^^^^^^^^^^
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 743, in compile
p = _parser.parse(p, flags)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/re/_parser.py", line 980, in parse
p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/re/_parser.py", line 455, in _parse_sub
itemsappend(_parse(source, state, verbose, nested + 1,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/re/_parser.py", line 841, in _parse
raise source.error('global flags not at the start '
re.error: global flags not at the start of the expression at position 12
I am using the latest version of Xssstrike but this issue keep showing. I updated all the packages and python is also newer version.Any solution to the above error.
Anon_security is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
The problem is, XSStrike work with Python 3.8 or 3.9.
Roll back to the older vertion or, consider creating a virtual environment with an older Python version:
pyenv install 3.8.10
pyenv virtualenv 3.8.10 xsstrike-env
pyenv activate xsstrike-env
After this you may run into an error: ModuleNotFoundError: No module named ‘requests’
Just run this command:
pip install requests
Now the tool will be working just fine.
Adithyakrishna V is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.