mirror of https://github.com/MISP/PyMISP
parent
218ffcd915
commit
e4d96bd198
|
@ -320,7 +320,12 @@ class PyMISP(object):
|
||||||
for f in result['result']:
|
for f in result['result']:
|
||||||
zipped = StringIO.StringIO(base64.b64decode(f['base64']))
|
zipped = StringIO.StringIO(base64.b64decode(f['base64']))
|
||||||
archive = zipfile.ZipFile(zipped)
|
archive = zipfile.ZipFile(zipped)
|
||||||
unzipped = StringIO.StringIO(archive.open(f['md5'], pwd='infected').read())
|
try:
|
||||||
|
# New format
|
||||||
|
unzipped = StringIO.StringIO(archive.open(f['filename'], pwd='infected').read())
|
||||||
|
except KeyError:
|
||||||
|
# Old format
|
||||||
|
unzipped = StringIO.StringIO(archive.open(f['md5'], pwd='infected').read())
|
||||||
details.append([f['event_id'], f['filename'], unzipped])
|
details.append([f['event_id'], f['filename'], unzipped])
|
||||||
return True, details
|
return True, details
|
||||||
|
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -4,7 +4,7 @@ from setuptools import setup
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='pymisp',
|
name='pymisp',
|
||||||
version='1.6',
|
version='1.7',
|
||||||
author='Raphaël Vinot',
|
author='Raphaël Vinot',
|
||||||
author_email='raphael.vinot@circl.lu',
|
author_email='raphael.vinot@circl.lu',
|
||||||
maintainer='Raphaël Vinot',
|
maintainer='Raphaël Vinot',
|
||||||
|
|
Loading…
Reference in New Issue