Skip to main content

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

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.

Installation

$ pip install tarsafe

Usage

import sys

from tarsafe import TarSafe

tar = TarSafe.open(sys.argv[1], "r")
tar.extractall()
tar.close()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for tarsafe, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size tarsafe-0.0.3-py3-none-any.whl (5.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size tarsafe-0.0.3.tar.gz (2.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page