Skip to content

Instantly share code, notes, and snippets.

@dreamlayers
dreamlayers / fatextract.py
Created March 12, 2026 16:23
Extract files from raw image of FAT12 disk
#!/usr/bin/env python3
# Extract files from raw image of FAT12 disk
# This is incomplete. Directories are not supported
import sys
with open(sys.argv[1], 'rb') as f:
b = f.read()
sector_size = 512