filetohex.py 170 B

1234567891011
  1. #!/usr/bin/env python3
  2. import sys
  3. with open(sys.argv[1], 'r') as file:
  4. s = file.read()
  5. b = bytearray()
  6. b.extend(map(ord, s))
  7. for a in b: print(hex(a), end =", ")