Update zipslip_good.py

This commit is contained in:
Ahmed Farid
2022-03-06 23:59:11 +01:00
committed by GitHub
parent 8649375be3
commit 7f2d242702

View File

@@ -1,6 +1,10 @@
import zipfile
zf = zipfile.ZipFile(filename)
with zipfile.open() as zipf:
for entry in zipf:
zipf.extract(entry, "/tmp/unpack/")
def unzip(filename, dir):
zf = zipfile.ZipFile(filename)
zf.extractall(dir)
def unzip1(filename, dir):
zf = zipfile.ZipFile(filename)
zf.extract(dir)