This Python script utilizes the pytsk3
library to scan and recover deleted files from a disk image or partition. It identifies deleted files based on the file system's metadata and provides functionality to recover these files to a specified output directory. The tool supports both Linux and Windows systems, given the appropriate permissions and libraries.
Ensure you have Python 3.x installed on your system. The script requires the pytsk3
library, which may have additional dependencies.
-
Install
pytsk3
and Dependencies:sudo apt-get update sudo apt-get install python3-pytsk3 libtsk-dev libewf-dev
-
Install Python Packages:
pip install pytsk3
-
Install Python Packages:
pip install pytsk3
-
Install Additional Dependencies:
Follow the instructions on the (PyTSK GitHub page)[https://github.com/py4n6/pytsk] for Windows-specific setup.
-
Set the Disk Path:
Open the
main.py
file and update thedisk_path
variable to point to the disk or partition you wish to analyze.disk_path = "/dev/sda2" # Replace with your actual disk or partition path
-
Set the Output Directory:
Specify the directory where recovered files will be saved by modifying the output_dir parameter in the list_files function call.
list_files(fs, output_dir="/path/to/recover/directory")
-Open a Terminal.
-Navigate to the Directory Containing the Script:
```bash
cd /path/to/your/script
```
-Run the Script with Appropriate Permissions:
Depending on your system configuration, you may need to run the script with sudo to access the disk or partition:
sudo python3 main.py
If you encounter permission issues, ensure you have the necessary access rights to the disk or partition.
-Open Command Prompt or PowerShell.
-Navigate to the Directory Containing the Script:
```cmd
cd C:\path\to\your\script
```
-Run the Script:
```cmd
python main.py
```
Permission Issues: Ensure you have read access to the disk or partition. On Linux, use sudo if necessary. Library Errors: Ensure all required libraries are installed and configured correctly. Refer to the Installation guide for setup instructions. Script Errors: If the script encounters errors, check the error messages for details. Common issues may include incorrect disk paths or file system compatibility.
For additional support or questions, please reach out to issakasaddick14@gmail.com