This simple Python script serves as an archive extractor, allowing users to easily extract contents from various compressed file formats, including Zip, Tar, 7-Zip, and RAR.
- Supports extraction of Zip, Tar, 7-Zip, and RAR archives.
- User-friendly command-line interface.
- Built-in file type detection using the
magic
library.
-
Clone the repository:
git clone https://github.com/your-username/your-repo.git
-
Navigate to the project directory:
cd your-repo
-
Run the script:
python3 archive_extractor.py
-
Follow the on-screen instructions to enter the path of the compressed file you want to extract.
This project is developed and tested on the Linux operating system. To run it on Windows:
-
Ensure Python is installed on your system. You can download it here.
-
Open a command prompt and navigate to the project directory.
-
Run the script:
python archive_extractor.py
-
Make the following changes to the script for Windows compatibility:
- Replace any Linux-specific paths with Windows paths.
- Ensure the required libraries (
zipfile
,tarfile
,py7zr
,rarfile
,magic
,os
) are installed on your Windows environment.
Follow the steps mentioned in the previous section for Linux.
[+] Enter the compressed file to extract it (or 'q' to quit): example.zip
[+] example.zip extracted successfully ...