Skip to content

Commit

Permalink
Update extract_domain_names.py
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronatp authored Jan 22, 2024
1 parent d0344e2 commit 4c877e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions capa/capabilities/extract_domain_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def verbose_extract_domains_and_ips(extractor: FeatureExtractor, doc: ResultDocu
domain_and_ip_counts = dict(domain_counts.items() + ip_counts.items())

for string, total_occurrances in domain_and_ip_counts:
if is_ip_addr(string) == True:
if is_ip_addr(string):
yield formatted_ip_verbose(extractor, file, string, total_occurrances)
else:
yield formatted_domain_verbose(extractor, file, string, total_occurrances)
Expand Down Expand Up @@ -182,7 +182,7 @@ def get_domain_functions(extractor: FeatureExtractor, file: Path, domain_or_ip:
except NotImplementedError: # if StaticExtractor methods are not implemented, we call DynamicExtractor yielder
caller_func = yielded_caller_func_dynamic(extractor, domain_or_ip, file, 0)

if caller_func == None:
if caller_func is None:
continue

api_functions.append(caller_func)
Expand Down Expand Up @@ -304,4 +304,4 @@ def yielded_caller_func_dynamic(
yield from yielded_caller_func_dynamic(extractor, api_name, file, addr)

except StopIteration:
yield None
yield None

0 comments on commit 4c877e4

Please sign in to comment.