A safe subclass of the TarFile class for interacting with tar files. Can be used as a direct drop-in replacement for safe usage of extractall()
Project description
# Tarsafe
![Unit Tests](https://github.com/beatsbears/tarsafe/workflows/Unit%20Tests/badge.svg)
Tarsafe is a drop-in replacement for the tarfile module from the standard library to safely handle the vulnerable `extractall()` method. Inspired by a [6 year old security bug](https://bugs.python.org/issue21109).
## Installation
```
$ pip install tarsafe
```
## Usage
```
from tarsafe import TarSafe
tar = TarSafe.open("example.tar", "r")
tar.extractall()
tar.close()
# OR
with TarSafe.open("example.tar", "r") as tar:
tar.extractall()
```
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tarsafe-0.0.5.tar.gz
(3.0 kB
view hashes)