Last active
September 23, 2023 17:43
-
-
Save nm004/a3eb150f24254ce850bb27cf76fdc9f2 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
# | |
# strtohex - Read hex values in string representaion from command line and write them | |
# in byte representation out to stdout | |
# | |
# This software is in the public domain | |
# | |
import os, sys | |
os.write(1, b''.join( bytes.fromhex(s) for s in sys.argv[1:] )) | |
# or only on unix | |
# os.writev(1, [ bytes.fromhex(s) for s in sys.argv[1:] ]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment