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
# Klein Tools TI250 image tool by Scott Smitelli. Public domain. | |
# Requires at least Python 3.6 (developed and tested on 3.9) | |
# See https://www.scottsmitelli.com/articles/klein-tools-ti250-hidden-worlds | |
import argparse | |
import numpy as np | |
import re | |
import struct | |
from PIL import Image, ImageDraw |
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
import math | |
import re | |
def hex_dump(data, cols=16): | |
data_len = len(data) | |
addr_pad = math.ceil(data_len.bit_length() / 4) | |
for i in range(0, data_len, cols): | |
paragraph = data[i:i + cols] | |
hex_view = paragraph.hex(' ', 1).ljust(cols * 3) |
OlderNewer