Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- codage: latin-1 -*-
- __author__ = 'Marwan'
- def str2hex(strraw):
- import binascii
- if isinstance(strraw, str):
- binaryhex = binascii.hexlify(bytes(strraw, 'latin-1'))
- hexstr = binaryhex.decode("latin-1")
- return hexstr
- else:
- print("strraw is not a str")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement