Last active
August 1, 2020 18:57
-
-
Save packetchef/8c23799f7e78383d1abd1b80470c7d91 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Convert with Python, individually: | |
>>> '\x3d' | |
'=' | |
>>> '\x22' | |
'"' | |
>>> '\x2e' | |
'.' | |
>>> '\x5c' | |
'\\' | |
Convert with Python, all at once: | |
$ python -c "print('\x3d\x22\x2e\x5c')" | |
Get the hex value for an integer: | |
>>> hex(99) | |
'0x63' | |
And drop the leading 0x: | |
>>> hex(99)[2:] | |
Math: | |
0xF | |
- 0x5 | |
------ | |
0xA | |
Some other characters | |
A = 0x41 (ASCII 65) | |
Z = 0x5A (ASCII 90) | |
a = 0x61 (ASCII 97) | |
z = 0x7A (ASCII 122) | |
0 = 0x30 (ASCII 48) | |
9 = 0x39 (ASCII 57) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment