Skip to content

Instantly share code, notes, and snippets.

@PierceLBrooks
Created March 23, 2026 20:37
Show Gist options
  • Select an option

  • Save PierceLBrooks/9202a8c7e92e58260d698867c9aaaae6 to your computer and use it in GitHub Desktop.

Select an option

Save PierceLBrooks/9202a8c7e92e58260d698867c9aaaae6 to your computer and use it in GitHub Desktop.
# Author: Pierce Brooks
import pyperclip
import sys
handle = open(sys.argv[1], "rb")
data = handle.read()
handle.close()
content = ""
for i in range(len(data)):
datum = hex(int(data[i]))[2:]
while (len(datum) < 2):
datum = "0"+datum
content += datum+" "
print(content)
pyperclip.copy(content.strip())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment