mirror of
https://github.com/mandiant/capa.git
synced 2025-12-12 15:49:46 -08:00
vmray: remove unneeded unpacking
This commit is contained in:
@@ -21,7 +21,7 @@ logger = logging.getLogger(__name__)
|
||||
def get_processes(analysis: VMRayAnalysis) -> Iterator[ProcessHandle]:
|
||||
processes: Dict[str, Process] = analysis.sv2.processes
|
||||
|
||||
for _, process in processes.items():
|
||||
for process in processes.values():
|
||||
# TODO (meh): should we use the OS process ID or vmray-assigned ID? https://github.com/mandiant/capa/issues/2148
|
||||
pid = process.monitor_id
|
||||
ppid = processes[process.ref_parent_process.path[1]].monitor_id if process.ref_parent_process else 0
|
||||
@@ -46,27 +46,27 @@ def extract_section_names(analysis: VMRayAnalysis) -> Iterator[Tuple[Feature, Ad
|
||||
|
||||
|
||||
def extract_referenced_filenames(analysis: VMRayAnalysis) -> Iterator[Tuple[Feature, Address]]:
|
||||
for _, filename in analysis.sv2.filenames.items():
|
||||
for filename in analysis.sv2.filenames.values():
|
||||
yield String(filename.filename), NO_ADDRESS
|
||||
|
||||
|
||||
def extract_referenced_mutex_names(analysis: VMRayAnalysis) -> Iterator[Tuple[Feature, Address]]:
|
||||
for _, mutex in analysis.sv2.mutexes.items():
|
||||
for mutex in analysis.sv2.mutexes.values():
|
||||
yield String(mutex.name), NO_ADDRESS
|
||||
|
||||
|
||||
def extract_referenced_domain_names(analysis: VMRayAnalysis) -> Iterator[Tuple[Feature, Address]]:
|
||||
for _, domain in analysis.sv2.domains.items():
|
||||
for domain in analysis.sv2.domains.values():
|
||||
yield String(domain.domain), NO_ADDRESS
|
||||
|
||||
|
||||
def extract_referenced_ip_addresses(analysis: VMRayAnalysis) -> Iterator[Tuple[Feature, Address]]:
|
||||
for _, ip_address in analysis.sv2.ip_addresses.items():
|
||||
for ip_address in analysis.sv2.ip_addresses.values():
|
||||
yield String(ip_address.ip_address), NO_ADDRESS
|
||||
|
||||
|
||||
def extract_referenced_registry_key_names(analysis: VMRayAnalysis) -> Iterator[Tuple[Feature, Address]]:
|
||||
for _, registry_record in analysis.sv2.registry_records.items():
|
||||
for registry_record in analysis.sv2.registry_records.values():
|
||||
yield String(registry_record.reg_key_name), NO_ADDRESS
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user