mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
Create zipslip_bad.py
This commit is contained in:
@@ -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/")
|
||||
Reference in New Issue
Block a user