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.2.tar.gz (2.8 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.2-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tarsafe-0.0.2.tar.gz
  • Upload date:
  • Size: 2.8 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.2.tar.gz
Algorithm Hash digest
SHA256 b7a93bb9b38b86d9da1d18c5c7bfa85862085133fbb4be6d25c386eb729446b3
MD5 ade6811c36638761d086a9e99537d03a
BLAKE2b-256 484726f9e63061a333b714e8c3e2d1468e177e1794f8248cb87988ffebd4dc00

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tarsafe-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0f810bf44cc84c19d1ae704fa4f5512f4600767a388d27af228c53fcc8612dac
MD5 9c3035523be4f332e3e7fce1e04bcc92
BLAKE2b-256 a14dfed3335d9f5623b73f32629a060db488e35566b3a1f4ba82b7f745a2ee16

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