Skip to content

Instantly share code, notes, and snippets.

@secretsquirrel
Last active March 1, 2016 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save secretsquirrel/b98fb4eb864883c76740 to your computer and use it in GitHub Desktop.
Save secretsquirrel/b98fb4eb864883c76740 to your computer and use it in GitHub Desktop.
just to get reverse hex values of strings
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