Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashing: re.error: global flags not at the start of the expression at position 12 #405

Open
4 tasks done
miguel-b-p opened this issue Jun 11, 2024 · 11 comments
Open
4 tasks done

Comments

@miguel-b-p
Copy link

Describe the bug
When it starts to generate payloads gives this error: re.error: global flags not at the start of the expression at position 12

To Reproduce
python3 xsstrike.py -u "https://cs.money/blog/?s="

Screenshots
image
image

Potential cause or fix
Nope

Environment:

  • OS: Kali GNU/Linux Rolling x86_64
  • Browser Firefox 115.11.0esr
  • Python 3.11.9

Some Questions

  • I am using the latest version of XSStrike.
  • I installed the dependecies using pip3 instead of pip
  • I have read the documentation before submitting this issue.
  • I have checked the other issues to see if someone reported this before.

Other comments
Do you have something else to say?

@rexnetpl
Copy link

I have the same problem.

@iammer0
Copy link

iammer0 commented Jun 22, 2024

go to XSStrike then go to core then use nano or anything and replace this line

pre = re.sub(r'(?s){.?}|(?s)(.?)|(?s)".?"|(?s)'.?'', '', pre)

to this

pre = re.sub(r'(?s)({.?}|(.?)|".?"|'.?')', '', pre)

then try the tool now

@ParamJani21
Copy link

github

at where i have to add this line...?

@uoqp
Copy link

uoqp commented Jul 14, 2024

github

at where i have to add this line...?

ma bro change it to
pre = re.sub(r'(?s)({.?}|(.?)|".?"|'.?')', '', pre)
(jsContexter.py)

@karimJD
Copy link

karimJD commented Jul 18, 2024

github
at where i have to add this line...?

ma bro change it to pre = re.sub(r'(?s)({.?}|(.?)|".?"|'.?')', '', pre) (jsContexter.py)

That's not working, change the code to this :
pre = re.sub(r'({.?}|(.?)|".?"|'.?')', '', pre)

@shetty197
Copy link

same changed but still not working

@Shirshakhtml
Copy link

Shirshakhtml commented Aug 1, 2024

Try this one

pre = re.sub(r'\{.*?\}|\(.*?\)|".*?"|\'[^\']*\'', '', pre, flags=re.DOTALL)

@precendent
Copy link

Try this one

pre = re.sub(r'\{.*?\}|\(.*?\)|".*?"|\'[^\']*\'', '', pre, flags=re.DOTALL)

It's Working!!!

@shetty197
Copy link

shetty197 commented Aug 9, 2024 via email

@Ethicallearner77
Copy link

Thanks bro for helping you gain one new follower

@sola1re
Copy link

sola1re commented Dec 9, 2024

github

at where i have to add this line...?

navigate to the directory then you can run a recursive grep:
grep -rH 'pre = re.sub' *

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

12 participants