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

Fix typing in hexdump docstring #1982

Merged
merged 1 commit into from Apr 19, 2022

Conversation

justinsteven
Copy link
Contributor

When calling hexdump() with a string-type s you get a BytesWarning:

>>> pwn.hexdump("abcd")
<stdin>:1: BytesWarning: Text is not bytes; assuming ASCII, no guarantees. See https://docs.pwntools.com/#bytes
'00000000  61 62 63 64                                         │abcd│\n00000004'

Problem being, IDEs get cranky if you call hexdump() with a bytes-type s due to the docstring.

Adjusted the docstring to indicate we expect bytes.

I'm sure there are many other instances of this worth tending to including the encoders (#1583, #1923 and so on) but this one in particular has been bugging me.

@justinsteven
Copy link
Contributor Author

Can this please be given the label hacktoberfest-accepted. Thanks!

@Arusekk Arusekk force-pushed the bugfix/fix_hexdump_docstring branch from 368e7c0 to 37d76c4 Compare April 19, 2022 22:19
@Arusekk Arusekk merged commit d7e9d31 into Gallopsled:dev Apr 19, 2022
gogo2464 pushed a commit to gogo2464/pwntools that referenced this pull request Sep 10, 2023
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.

None yet

2 participants