aboutsummaryrefslogtreecommitdiff
path: root/scripts/filetohex.py
blob: 73ad5a9721377486fe4b8146ffbc317265784ff2 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python3
import sys

with open(sys.argv[1], 'r') as file:
    s = file.read()

b = bytearray()
b.extend(map(ord, s))

for a in b: print(hex(a), end =", ")