Update zipslip_bad.py

This commit is contained in:
Ahmed Farid
2022-03-01 00:24:33 +01:00
committed by GitHub
parent 85bcaa96ce
commit 70c0c7e461

View File

@@ -6,4 +6,4 @@ zf = zipfile.ZipFile(filename)
with zf.open() as zipf:
#BAD : This could write any file on the filesystem.
for entry in zipf:
shutil.copyfileobj(entry, "/tmp/unpack/")
shutil.copy(entry, "/tmp/unpack/")