Enterprise-Grade Disk Imaging & Data Recovery Solution
A robust Python-based file carving and data recovery project designed to extract images, videos, and documents from corrupted or inaccessible storage volumes using file signature detection.
- Overview
- Project Architecture
- Environment Requirements & Setup
- FFmpeg Guidelines & Installation
- Usage Guides
- Key Features
- Important Security & Best Practices
- Project Goal
- Licence
Pumpkin Carver is a digital forensic and data recovery solution designed to recover lost data from raw disk images (.img). By leveraging file signature detection and carving techniques, it can reconstruct images, videos, and documents even when the underlying filesystem or partition table is damaged.
The project provides two flexible workflows depending on your requirements:
- Modular CLI Tools: Lightweight, role-specific scripts for granular control or automation.
- Integrated Graphical User Interface (GUI): A unified application combining acquisition, extraction, and reporting.
Pumpkin-Carver/
βββ π README.md
βββ π LICENSE
βββ π CLI_per_role_source_code/ # Command-line tools (CLI)
β βββ π Imager.py # Low-level disk acquisition module (Windows)
β βββ π Video_Carving_only.py # Specialized video carving script
β βββ π Image&Document_carving.py # Image and document carving script
β
βββ π UI_AllInOne_source_code/ # Integrated graphical application (GUI)
βββ π pumpkin_carver_integrated.py # Integrated Application v1
βββ π pumpkin_carver_integrated_v2.py # Integrated Application v2 (Recommended)
| Component | Requirement | Notes |
|---|---|---|
| Python | 3.10 or newer | Required for all scripts and interfaces |
| OS (Imager) | Windows 10/11 | Required for low-level volume access in Imager.py |
| OS (Carving) | Cross-platform | Works on Windows, macOS, and Linux |
| Storage Space | Dedicated target drive | Sufficient space on a separate physical disk for images & outputs |
# For modular carving scripts (Image validation with Pillow)
python -m pip install Pillow
# For the integrated application (GUI + Utilities)
python -m pip install flet Pillow psutilFor optional video analysis, validation, and repair features, FFmpeg (including ffprobe) must be installed on your system and added to your system PATH.
- Download the official build from ffmpeg.org (e.g., precompiled builds from gyan.dev as a
.zip). - Extract the archive to a permanent folder (e.g.,
C:\Program Files\ffmpeg). - Add the
bindirectory to your System PATH:- Press
Win + R, typesysdm.cpl, and hit Enter. - Go to the Advanced tab β Click Environment Variables.
- Under System variables, select
Pathβ Click Edit. - Click New and paste the path to the
binfolder (e.g.,C:\Program Files\ffmpeg\bin). - Click OK on all windows.
- Press
- Verify installation in a new Command Prompt:
ffmpeg -version ffprobe -version
# Using Homebrew (recommended)
brew install ffmpeg
# Verify installation
ffmpeg -version
ffprobe -version# Ubuntu / Debian
sudo apt update && sudo apt install -y ffmpeg
# Fedora / RHEL
sudo dnf install ffmpeg
# Arch Linux
sudo pacman -S ffmpeg
# Verify installation
ffmpeg -versionThe modular version decouples disk imaging from file carving for granular control.
cd CLI_per_role_source_code
python Imager.pyFollow the interactive prompts to:
- Select the target source Windows volume.
- Select an output directory located on a different physical drive.
- Define the destination
.imgfilename. - Monitor the acquisition progress (supports resuming interrupted acquisitions).
python "Image&Document_carving.py" "D:\Images\volume.img" -o "E:\Recovered\Images"Supported formats: JPG, PNG, GIF, BMP, and PDF.
python Video_Carving_only.py "D:\Images\volume.img" -o "E:\Recovered\Videos"Supported formats: MP4, MKV, MOV, AVI, and other media containers.
Both carving scripts support flags for parallel processing, output limits, and resuming interrupted runs.
The integrated application combines volume acquisition and file carving into a unified user interface.
cd UI_AllInOne_source_code
# Launch Version 2 (Recommended)
python pumpkin_carver_integrated_v2.py- Setup Carving: Acquire a raw disk image of a selected volume.
- Full Carving: Acquire a volume image and immediately carve selected file categories.
- Extraction from an existing image: Carve files directly from a pre-existing
.imgfile.
- Launch the application and select your desired workflow.
- Choose the source volume or existing
.imgfile. - Configure target file categories, output directories, and recovery options.
- Start execution and monitor live progress reports.
- Review extracted files sorted automatically into category folders (Photos, Videos, Audio, Documents, Archives).
- Read-Only Source Access: Ensures zero write operations on source media during imaging.
- Signature-Based Carving: Leverages headers and footers (magic bytes) to extract data without relying on filesystems.
- Parallel Processing: Multi-threaded engine for accelerated carving speed.
- Deduplication & Integrity: SHA-256 hash generation for duplicate filtering and integrity checks.
- State Persistence: Progress tracking with resume capabilities for interrupted tasks.
- Reporting: Structured recovery logging and reports for post-recovery auditing.
- Deep Media Analysis: Optional Pillow-based image verification and FFmpeg-driven video validation.
Warning
Golden Rule of Data Recovery: NEVER write or save recovered files onto the affected source volume/drive. Always use a separate physical disk as the output destination to prevent overwriting unrecovered data.
- Work on Images: Always acquire a raw disk image (
.img) first and execute carving against the image rather than interacting directly with failing hardware. - Carving Limitations: Carving effectiveness depends on file fragmentation and sector continuity. Files that are highly fragmented or partially overwritten may be unrecoverable or corrupted.
- Forensic Disclaimer: This software is designed for personal data recovery and technical analysis; it is not a certified judicial forensic tool.
Pumpkin Carver evolved from a modular proof of concept into an integrated recovery application, with a focus on simplifying file carving and improving processing performance.
The objective is to provide a practical, transparent Python-based alternative for recovering valuable digital files when conventional filesystem access is no longer viable.
Recover data. Preserve integrity. Keep carving. π
Ce projet est sous licence MIT - voir le fichier LICENSE pour plus de dΓ©tails.