Skip to content

Commit

Permalink
Merge pull request #1295 from ragusaa/CLAM-2585-OleCheckEncrypted_3
Browse files Browse the repository at this point in the history
Clam 2585 ole check encrypted 3
  • Loading branch information
micahsnyder authored Sep 11, 2024
2 parents 51e2390 + 6d50a60 commit 8ae19ec
Show file tree
Hide file tree
Showing 17 changed files with 942 additions and 22 deletions.
363 changes: 341 additions & 22 deletions libclamav/ole2_extract.c

Large diffs are not rendered by default.

587 changes: 587 additions & 0 deletions unit_tests/clamscan/ole2_encryption_test.py

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
14 changes: 14 additions & 0 deletions unit_tests/testcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,20 @@ def execute_command(self, cmd, **kwargs):
"""
return self.execute(cmd, **kwargs)

# Find the metadata.json file and verify its contents.
def verify_metadata_json(self, tempdir, expected=[], unexpected=[]):
for parent, dirs, files in os.walk(tempdir):
for f in files:
if "metadata.json" == f:
with open(os.path.join(parent, f)) as handle:
metadata_json = handle.read()
self.verify_output(metadata_json, expected=expected, unexpected=unexpected)

# There is only one metadata.json per scan.
# We found it, so we can break out of the loop.
break



class Logger(object):

Expand Down

0 comments on commit 8ae19ec

Please sign in to comment.