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

[BUG Report]: Error #524

Closed
Pix-10 opened this issue Dec 17, 2023 · 3 comments
Closed

[BUG Report]: Error #524

Pix-10 opened this issue Dec 17, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Pix-10
Copy link

Pix-10 commented Dec 17, 2023

Version

2.4 (Default)

Which section is the problem?

Script Base

Please complete the following information

- OS: Windows 11 Pro
- Installed Requirements Version 
cloudscraper==1.2.71
certifi==2022.12.7
dnspython==2.2.1
requests==2.27.1
impacket==0.10.0
psutil>=5.9.3
icmplib>=2.1.1
pyasn1==0.4.8
pyroxy @ git+https://github.com/MatrixTM/PyRoxy.git
yarl>=1.9.2 

- Python Version 3.12.1

What happened (Describe the bug) ?

It gave me this:
D:\MHDDoS\start.py:168: SyntaxWarning: invalid escape sequence '\d'
IP = compile("(?:\d{1,3}.){3}\d{1,3}")
D:\MHDDoS\start.py:169: SyntaxWarning: invalid escape sequence '\d'
protocolRex = compile('"protocol":(\d+)')

Screenshots

https://imgur.com/a/jJzFpqM

Please provide a link to a minimal reproduction of the bug

No response

Relevant log output

D:\MHDDoS\start.py:168: SyntaxWarning: invalid escape sequence '\d'
  IP = compile("(?:\d{1,3}\.){3}\d{1,3}")
D:\MHDDoS\start.py:169: SyntaxWarning: invalid escape sequence '\d'
  protocolRex = compile('"protocol":(\d+)')

Additional context

No response

Your code

IP = compile(r"(?:\d{1,3}\.){3}\d{1,3}")
protocolRex = compile('"protocol":(\\d+)')
@Pix-10 Pix-10 added the bug Something isn't working label Dec 17, 2023
@Kuchiriel
Copy link

Any news?

@fbicudo
Copy link

fbicudo commented Nov 7, 2024

Do we have an answer to this issue?

@vietjovi
Copy link

vietjovi commented Nov 12, 2024

Let try with this fix f8e9384

IP = compile(r"(?:\d{1,3}\.){3}\d{1,3}")
protocolRex = compile(r'"protocol":(\d+)')

There are language changes in Python 3.12 - Reference: https://docs.python.org/3/whatsnew/3.12.html#other-language-changes

A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning, instead of DeprecationWarning. For example, re.compile("\d+.\d+") now emits a SyntaxWarning ("\d" is an invalid escape sequence, use raw strings for regular expression: re.compile(r"\d+.\d+")). In a future Python version, SyntaxError will eventually be raised, instead of SyntaxWarning. (Contributed by Victor Stinner in python/cpython#98401.)

I also created a MR here: #591

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants