def from_obj(hypervisor_host_system_obj): if not hypervisor_host_system_obj: return None hypervisor_host_system_ = System.from_obj(hypervisor_host_system_obj, HypervisorHostSystem()) hypervisor_host_system_.vm_hypervisor = PlatformSpecification.from_obj( hypervisor_host_system_obj.get_VM_Hypervisor() ) return hypervisor_host_system_
def from_obj(malware_subject_obj): if not malware_subject_obj: return None malware_subject_ = MalwareSubject(None) malware_subject_.id = malware_subject_obj.get_id() malware_subject_.malware_instance_object_attributes = Object.from_obj(malware_subject_obj.get_Malware_Instance_Object_Attributes()) malware_subject_.minor_variants = MinorVariants.from_obj(malware_subject_obj.get_Minor_Variants()) malware_subject_.configuration_details = MalwareConfigurationDetails.from_obj(malware_subject_obj.get_Configuration_Details()) malware_subject_.development_environment = MalwareDevelopmentEnvironment.from_obj(malware_subject_obj.get_Development_Environment()) malware_subject_.field_data = None #TODO: add support malware_subject_.analyses = Analyses.from_obj(malware_subject_obj.get_Analyses()) malware_subject_.findings_bundles = FindingsBundleList.from_obj(malware_subject_obj.get_Findings_Bundles()) malware_subject_.relationships = MalwareSubjectRelationshipList.from_obj(malware_subject_obj.get_Relationships()) if malware_subject_obj.get_Label(): malware_subject_.label = [VocabString.from_obj(x) for x in malware_subject_obj.get_Label()] if malware_subject_obj.get_Compatible_Platform(): malware_subject_.compatible_platform = [PlatformSpecification.from_obj(x) for x in malware_subject_obj.get_Compatible_Platform()] return malware_subject_