Last active
August 29, 2015 14:20
-
-
Save Climax777/e3db8513a0f3d90b6bdf 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
#!/usr/bin/env python3 | |
#GistID: e3db8513a0f3d90b6bdf | |
import binascii | |
import sys | |
def hextoimei(hexstring): | |
hexstring = hexstring.replace(" ", "") | |
hexstring = hexstring.replace("0x", "") | |
hexstring = hexstring.replace("0X", "") | |
return int.from_bytes(binascii.a2b_hex(hexstring), byteorder="little") | |
if __name__ == "__main__": | |
if len(sys.argv) > 1: | |
for arg in sys.argv[1:]: | |
print(hextoimei(arg)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment