Skip to content

Commit

Permalink
base_extractor.py: rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
yelhamer committed Aug 20, 2024
1 parent 0640ba9 commit b693aa0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions capa/features/extractors/base_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def FunctionFilter(extractor: StaticFeatureExtractor, functions: Set) -> StaticF
original_get_functions = extractor.get_functions # fetch original get_functions()

def filtered_get_functions(self):
yield from (f for f in get_functions() if f.address in functions)
yield from (f for f in original_get_functions() if f.address in functions)

# make a copy of the extractor before decorating the get_functions() method
new_extractor = copy(extractor)
Expand Down Expand Up @@ -483,10 +483,10 @@ def get_call_name(self, ph: ProcessHandle, th: ThreadHandle, ch: CallHandle) ->


def ProcessFilter(extractor: DynamicFeatureExtractor, processes: Set) -> DynamicFeatureExtractor:
get_processes = extractor.get_processes # fetch original get_functions()
original_get_processes = extractor.get_processes # fetch original get_functions()

def filtered_get_processes(self):
yield from (f for f in get_processes() if f.address.pid in processes)
yield from (f for f in original_get_processes() if f.address.pid in processes)

# make a copy of the extractor before decorating the get_processes() method
new_extractor = copy(extractor)
Expand Down

0 comments on commit b693aa0

Please sign in to comment.