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.

Source Distribution

tarsafe-0.0.3.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tarsafe-0.0.3-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file tarsafe-0.0.3.tar.gz.

File metadata

  • Download URL: tarsafe-0.0.3.tar.gz
  • Upload date:
  • Size: 2.5 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

Hashes for tarsafe-0.0.3.tar.gz
Algorithm Hash digest
SHA256 7acf73a11b576fcbb003b52adecf4706d6c3009c6af28a01fd21949235ffd806
MD5 138c8052cf5d62e253dabc806d008537
BLAKE2b-256 bcc4fbbadaa6010d295618df133fcaa3a0f9176bb74b0852bef728053282b1ae

See more details on using hashes here.

File details

Details for the file tarsafe-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: tarsafe-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.0 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

Hashes for tarsafe-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f8181c5559aea70af2579a0dc0811d2e9e3eabd706dd594555b4dfa52c0be51a
MD5 080338e44178f7c5e74faee8baf574b8
BLAKE2b-256 f451274cf233696b1bfb830a61c757034083495a865b13a5d6263496756d8a11

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page