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

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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tarsafe-0.0.5.tar.gz.
File metadata
- Download URL: tarsafe-0.0.5.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbdffc260d8a33f0e35ed7b70b2e2f56ad40e77019e5384bbe1cfc1ccccac79a
|
|
| MD5 |
35a71973350f90e3025cd24fa639eb0a
|
|
| BLAKE2b-256 |
17a37787b1103146248f365528f1a4870e5d6c79c82175a1f8b5117617621bf3
|
File details
Details for the file tarsafe-0.0.5-py3-none-any.whl.
File metadata
- Download URL: tarsafe-0.0.5-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a6aa8255c181d6070db3b083f6d969602c6306ba3dc7c836a288cc26a5c5bff
|
|
| MD5 |
f9cee331913dd06a6b1450facf5be695
|
|
| BLAKE2b-256 |
f18c4aadcd0eca9001266ef026338df159cc5f75483abea8f9f97e2dc2fd705f
|