Zero-Dependency Offline Security CLIs in Python: PE/ELF Entropy Triage & Lossless EXIF/PDF Scrubbing
When auditing untrusted binaries in CI or stripping hidden GPS/author metadata from documents before publishing, uploading files to third-party cloud tools is often a non-starter. Using only the Python 3.10+ standard li
When auditing untrusted binaries in CI or stripping hidden GPS/author metadata from documents before publishing, uploading files to third-party cloud tools is often a non-starter.
Using only the Python 3.10+ standard library (struct, hashlib, math, re), you can inspect binary internals and scrub file metadata 100% offline in milliseconds:
1. Offline PE & ELF Static Triage (bin-triage-pro)
- Parses Windows PE (
.exe/.dll) and Linux ELF headers directly viastruct.unpack_from. - Computes per-section Shannon entropy to flag packed/encrypted sections (
>= 7.0). - Detects common packer signatures (
UPX,VMProtect,Themida,ASPack,PyInstaller), flags sensitive Win32 API indicators, and harvests embedded URLs/IPs. - Docs: GitHub | Full CLI + Tests ($29): Gumroad
2. Lossless Offline EXIF, PNG & PDF Metadata Scrubber (meta-scrub-pro)
- Parses raw JPEG markers (
APP1EXIF/XMP,COM), PNG chunks (tEXt/zTXt/iTXt/eXIf/tIME— including hidden AI prompt metadata), and PDF/Author& XMP streams. - Strips tracking metadata losslessly without re-encoding pixels, plus generates GDPR Art. 17 / CCPA data-erasure notices.
- Docs: GitHub | Full CLI + Tests ($19): Gumroad
Both tools run 100% offline with zero third-party packages. Let me know what file formats you'd like added next!
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.