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

libcdb.py - python 3.12 #2302

Merged
merged 2 commits into from
Nov 24, 2023
Merged

libcdb.py - python 3.12 #2302

merged 2 commits into from
Nov 24, 2023

Conversation

xambroz
Copy link
Contributor

@xambroz xambroz commented Nov 20, 2023

Python 3.12 would complain if the \d atom is not escaped in the binary string.

/usr/lib/python3.12/site-packages/pwnlib/commandline/libcdb.py:224: SyntaxWarning: invalid escape sequence '\d'
libc_version = re.search(b'libc -', exe.data)

Python 3.12 would complain if the \d atom is not escaped in the binary string.

/usr/lib/python3.12/site-packages/pwnlib/commandline/libcdb.py:224: SyntaxWarning: invalid escape sequence '\d'
  libc_version = re.search(b'libc[ -](\d+\.\d+)', exe.data)
Copy link
Member

@peace-maker peace-maker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! I think raw strings are more readable than escaping the backslashes.

pwnlib/commandline/libcdb.py Outdated Show resolved Hide resolved
@peace-maker peace-maker merged commit 77957b4 into Gallopsled:dev Nov 24, 2023
7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants