Merge pull request #235 from Lastpixl/master

chg: fix sample retrieval from new-style zips
pull/238/head
Raphaël Vinot 2018-06-12 15:25:08 +02:00 committed by GitHub
commit 3ea729c627
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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: