chg: fix sample retrieval from new-style zips

pull/235/head
Xavier Mehrenberger 2018-06-08 10:47:08 +02:00
parent 558c692920
commit a5800f84db
No known key found for this signature in database
GPG Key ID: FD3D563AEBC0307E
1 changed files with 1 additions and 1 deletions

View File

@ -1210,7 +1210,7 @@ class PyMISP(object):
zipped = BytesIO(decoded)
try:
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
unzipped = BytesIO(archive.open(f['md5'], pwd=b'infected').read())
else: