Do you find yourself exploring file formats, such as GIF, and finding yourself
annoyed with hex editors? Do you find yourself wanting to craft 802.11 packets,
but you know you'll never be able to keep all the fields straight in your head?
Write those packets in hext! hext (*.hxt
) is a file format for writing small
(or large, if you dare) binary files with comments. You can switch between hex,
binary, and decimal and even stick some string literals in there.
This is what a small GIF looks like: ``` ~little-endian msb0 "GIF89a" # File header and version string
u16=4 u16=4 # Canvas width/height .1 # Global Color Table Flag .000 # Color Resolution .0 # Reserved in 87a .000 # Number of colors. 2^(this_value + 1) colors 00 # Background Color Index 00 # Pixel Aspect Ratio
=0 =0 =0 # Black =255 =255 =255 # White
"," # Image Separator u16=0 u16=0 # Image offset left/top u16=4 u16=4 # Image width/height .1 # Local Color Table Flag .0 # Interlaced Flag .000 # Reserved in 87a .000 # Size of local color table
=0 =0 =0 # Black =128 =0 =255 # Purple
02 # LZW Minimum Code Size 05 841D817A50 00 # Data sub-block
"!" F9 # Extension Introducer and Graphic Control Label =4 # Extension data block size .000 # Reserved .010 # Disposal Method (010 is restore to background color) .0 # User Input Flag .0 # Transparent color flag
u16=50 # Delay (1/100ths of a second)
00 # Transparent Color Index
00 # Block terminator
"," u16=0 u16=0 u16=4 u16=4 .00000000
02 05 841D817A50 00
";" # GIF Terminator ```
I really do mean small. Here it is: