Ejemplo n.º 1
0
 def from_dict(hypervisor_host_system_dict):
     if not hypervisor_host_system_dict:
         return None
     hypervisor_host_system_ = System.from_dict(hypervisor_host_system_dict, HypervisorHostSystem())
     hypervisor_host_system_.vm_hypervisor = PlatformSpecification.from_dict(
         hypervisor_host_system_dict.get("vm_hypervisor")
     )
     return hypervisor_host_system_
Ejemplo n.º 2
0
 def from_dict(malware_subject_dict):
     if not malware_subject_dict:
         return None
     malware_subject_ = MalwareSubject(None)
     malware_subject_.id = malware_subject_dict.get('id')
     malware_subject_.malware_instance_object_attributes = Object.from_dict(malware_subject_dict.get('malware_instance_object_attributes'))
     malware_subject_.minor_variants = MinorVariants.from_list(malware_subject_dict.get('minor_variants'))
     malware_subject_.configuration_details = MalwareConfigurationDetails.from_dict(malware_subject_dict.get('configuration_details'))
     malware_subject_.development_environment = MalwareDevelopmentEnvironment.from_dict(malware_subject_dict.get('development_environment'))
     malware_subject_.field_data = None #TODO: add support
     malware_subject_.analyses = Analyses.from_list(malware_subject_dict.get('analyses'))
     malware_subject_.findings_bundles = FindingsBundleList.from_dict(malware_subject_dict.get('findings_bundles'))
     malware_subject_.relationships = MalwareSubjectRelationshipList.from_list(malware_subject_dict.get('id'))
     if malware_subject_dict.get('label'):
         malware_subject_.label = [VocabString.from_dict(x) for x in malware_subject_dict.get('label')]
     if malware_subject_dict.get('compatible_platform'):
         malware_subject_.compatible_platform = [PlatformSpecification.from_dict(x) for x in malware_subject_dict.get('compatible_platform')]
     return malware_subject_