mirror of https://github.com/MISP/PyMISP
Merge pull request #235 from Lastpixl/master
chg: fix sample retrieval from new-style zipspull/238/head
commit
3ea729c627
|
@ -1210,7 +1210,7 @@ class PyMISP(object):
|
||||||
zipped = BytesIO(decoded)
|
zipped = BytesIO(decoded)
|
||||||
try:
|
try:
|
||||||
archive = zipfile.ZipFile(zipped)
|
archive = zipfile.ZipFile(zipped)
|
||||||
if f.get('md5') and f['md5'] in archive.infolist():
|
if f.get('md5') and f['md5'] in archive.namelist():
|
||||||
# New format
|
# New format
|
||||||
unzipped = BytesIO(archive.open(f['md5'], pwd=b'infected').read())
|
unzipped = BytesIO(archive.open(f['md5'], pwd=b'infected').read())
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue