Create zipslip_bad.py

This commit is contained in:
Ahmed Farid
2022-03-02 18:09:45 +01:00
committed by GitHub
parent c8f73ec845
commit aef1df122b

View File

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