Skip to content

Instantly share code, notes, and snippets.

View Maphist0's full-sized avatar
🤒
Out sick

Zongpu Zhang Maphist0

🤒
Out sick
View GitHub Profile
@Maphist0
Maphist0 / parseml.py
Last active July 10, 2025 23:31 — forked from urschrei/parseml.py
Extract attachments from EML files in the current dir, and write them to the output subdir. Now with recursion and robust filename handling
#!/usr/bin/env python3
"""
2025 update:
- Recursive extraction from nested EML files
- Robust filename handling with sanitization and deduplication
- Proper logging instead of print statements
- Enhanced error handling and validation
- Binary file reading for better encoding support
- Cross-platform filename compatibility