Skip to content

Commit

Permalink
Merge pull request #1844 from mandiant/mr-tz-patch-1
Browse files Browse the repository at this point in the history
fix whitespace removal in format check
  • Loading branch information
mr-tz authored Nov 11, 2023
2 parents 0097822 + 41a3976 commit dee0aa7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion capa/features/extractors/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def extract_format(buf) -> Iterator[Tuple[Feature, Address]]:
yield Format(FORMAT_FREEZE), NO_ADDRESS
elif buf.startswith(MATCH_RESULT):
yield Format(FORMAT_RESULT), NO_ADDRESS
elif re.sub(rb"\w", b"", buf[:20]).startswith(MATCH_JSON_OBJECT):
elif re.sub(rb"\s", b"", buf[:20]).startswith(MATCH_JSON_OBJECT):
# potential start of JSON object data without whitespace
# we don't know what it is exactly, but may support it (e.g. a dynamic CAPE sandbox report)
# skip verdict here and let subsequent code analyze this further
Expand Down

0 comments on commit dee0aa7

Please sign in to comment.