Skip to content

Instantly share code, notes, and snippets.

View pablomartinezm's full-sized avatar
🐒
Jumping

Pablo Martinez pablomartinezm

🐒
Jumping
View GitHub Profile
@urschrei
urschrei / parseml.py
Last active June 12, 2025 08:54
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