Skip to content

Commit

Permalink
process: simplify string enumeration loop
Browse files Browse the repository at this point in the history
  • Loading branch information
williballenthin authored Aug 10, 2023
1 parent ae9d773 commit 85b58d0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions capa/features/extractors/cape/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ def extract_environ_strings(behavior: Dict, ph: ProcessHandle) -> Iterator[Tuple
if not environ:
return

for _, value in environ.items():
if value:
yield String(value), ph.address
for value in (value for value in environ.values() if value):
yield String(value), ph.address


def extract_features(behavior: Dict, ph: ProcessHandle) -> Iterator[Tuple[Feature, Address]]:
Expand Down

0 comments on commit 85b58d0

Please sign in to comment.