Skip to content

Instantly share code, notes, and snippets.

View pisanvs's full-sized avatar
Programming

pisanvs pisanvs

Programming
View GitHub Profile
@pisanvs
pisanvs / zip_recover.py
Created April 23, 2026 17:23
zip_recover.py - Stream-scan a truncated/corrupt ZIP and extract everything recoverable. Finds PK local file headers (PK\x03\x04) by scanning raw bytes, no index needed.
#!/usr/bin/env python3
"""
zip_recover.py - Stream-scan a truncated/corrupt ZIP and extract everything recoverable.
Finds PK local file headers (PK\x03\x04) by scanning raw bytes, no index needed.
Usage:
python3 zip_recover.py <archive.zip> <output_dir>
Options:
--dry-run Just list files, don't extract