Skip to content
V4larPublic
forked from beatsbears/tarsafe

About

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()

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

48 Commits

Folders and files

Repository files navigation

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

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()

About

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()

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages