Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Script in python that print the hex value from a base4 string passed by argument
import sys
import base64
#import binascii
#Controlamos que tenga argumento
if(len(sys.argv)!=2):
print 'usage: convert_base64_to_hex.py <DigestValue>'
sys.exit(2)
base64string = sys.argv[1]
print base64.decodestring(base64string).encode('hex')
#print binascii.a2b_base64(base64string).encode('hex')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment