-
RAR5 Parsing in Pure Python
- Validates the RAR5 magic header
- Iterates through RAR5 headers (
HEAD_TYPE,HEAD_FLAGS) - Extracts header body, extra area, and data area
-
ADS Detection
- Scans for
:<streamname>markers that indicate Alternate Data Streams - Handles streams embedded in
XTRAblocks and across header/data areas
- Scans for
-
Safe Extraction
- Dumps the raw ADS bytes to an output directory
- Filenames follow the pattern:
<basefilename>__<streamname>
-
Automatic Decoding (when possible)
- If the ADS is stored (uncompressed) as plain text, attempts decoding:
- UTF-8 / UTF-16 / UTF-32 / Latin-1
- Creates an additional
*.decoded.txtfile with readable content
- If the ADS is RAR-compressed or encrypted, preserves the raw bytes for further analysis
- If the ADS is stored (uncompressed) as plain text, attempts decoding:
How It Works
RAR5 parsing and ADS extraction pipeline.
