mirror of https://github.com/lumapu/ahoy.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
236 B
8 lines
236 B
#!/usr/bin/python
|
|
import sys
|
|
f = open (sys.argv[1], 'rb').read()
|
|
for n, c in enumerate(f):
|
|
if n % 16 == 0: print (' "', end = '')
|
|
print (f"\\x{c:02x}", end = '')
|
|
if n % 16 == 15: print ('" \\')
|
|
if n % 16 != 15: print ('"')
|
|
|