From 42b95c4210a5d19b45cc368ad150438cbbd550ff Mon Sep 17 00:00:00 2001 From: chrisr3d Date: Wed, 24 Jul 2019 12:21:58 +0200 Subject: [PATCH] fix: Fixed variable names --- misp_modules/lib/joe_parser.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/misp_modules/lib/joe_parser.py b/misp_modules/lib/joe_parser.py index 431640b2..83eca3be 100644 --- a/misp_modules/lib/joe_parser.py +++ b/misp_modules/lib/joe_parser.py @@ -212,11 +212,12 @@ class JoeParser(): file_object.add_attribute(object_relation, **{'type': attribute_type, 'value': fileinfo[field]}) try: to_call = arch_type_mapping[self.data['generalinfo']['arch']] - getattr(self, to_call)(fileinfo[to_call.split('_')[-1]], file_object) + getattr(self, to_call)(fileinfo, file_object) except KeyError: self.misp_event.add_object(**file_object) - def parse_apk(self, apkinfo, fileobject): + def parse_apk(self, fileinfo, file_object): + apkinfo = fileinfo['apk'] self.misp_event.add_object(**file_object) permission_lists = defaultdict(list) for permission in apkinfo['requiredpermissions']['permission']: @@ -232,7 +233,8 @@ class JoeParser(): self.references[file_object.uuid].append(dict(referenced_uuid=permission_object.uuid, relationship_type='grants')) - def parse_pe(self, peinfo, file_object): + def parse_pe(self, fileinfo, file_object): + peinfo = fileinfo['pe'] pe_object = MISPObject('pe') file_object.add_reference(pe_object.uuid, 'included-in') self.misp_event.add_object(**file_object)