mirror of https://github.com/MISP/PyMISP
fix: Download old samples was broken.
parent
6c21728e04
commit
baa617aae4
|
@ -1147,7 +1147,7 @@ class PyMISP(object):
|
||||||
zipped = BytesIO(decoded)
|
zipped = BytesIO(decoded)
|
||||||
try:
|
try:
|
||||||
archive = zipfile.ZipFile(zipped)
|
archive = zipfile.ZipFile(zipped)
|
||||||
if f.get('md5'):
|
if f.get('md5') and f['md5'] in archive.infolist():
|
||||||
# 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