mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Update zipslip_bad.py
This commit is contained in:
@@ -2,15 +2,12 @@ import zipfile
|
||||
import shutil
|
||||
|
||||
def unzip(filename):
|
||||
|
||||
with zipfile.ZipFile(filename) as zipf:
|
||||
#BAD : This could write any file on the filesystem.
|
||||
for entry in zipf:
|
||||
shutil.copy(entry, "/tmp/unpack/")
|
||||
|
||||
def unzip1(filename):
|
||||
|
||||
|
||||
with zipfile.ZipFile(filename) as zipf:
|
||||
for entry in zipf:
|
||||
with open(entry, 'wb') as dstfile:
|
||||
|
||||
Reference in New Issue
Block a user