Last active
March 1, 2016 20:52
-
-
Save secretsquirrel/b98fb4eb864883c76740 to your computer and use it in GitHub Desktop.
just to get reverse hex values of strings
This file contains hidden or 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
def reverse_string(somestring): | |
temp = '' | |
for i in somestring[::-1]: | |
k = hex(ord(i)).replace("0x", "") | |
if len(k) == 1: | |
k += k + "0" | |
temp += k | |
print temp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment