-
# Conflicts: # tests/olevba/test_basic.py
-
Decrypting test samples "on the fly" using a generator causes trouble when removing the temp file, PyPy/Windows thinks the file is still being used.
-
Pylint is just wrong in a few cases (admittedly: those are hard), so can safely ignore these warnings. Also ignore errors in thirdparty, this is not really our code. Also remove a few old "pylint silencers" ("# pylint: disable=...") that are not used any more in v3.10 of pylint -
If there is an error in log-handling (e.g. wrong args to logger call) do not fail or raise but produce something helpful
-
Need to make sure that json output is formatted since e.g. warning messages are created like this: log.warning('%s', actual_message) so without proper formatting the message is just "%s". Also test that exception info is added as usual. -
Warning message includes source file and line number, hope this is not dependent on python version..
-
Encountered an example where a 3rd-party library issued a warning that messed up the json output. Create test to reproduce this.
-
Do not assume a known length of output when checking it. Only assume that meta information about oletool used is first. Ignore warnings and messages that come after that to identify the actual result we want to check.
-
(1) Cannot open a temp file for writing from 2 python processes simultaneously (2) Need proper environment setup for Popen (thanks to metatoaster's reply on stackoverflow https://stackoverflow.com/a/72845540/4405656) (3) Need different os-separator, so replace hard-coded '/' with os.path.join or os.sep (4) Minor cleanup of imports & whitespace in test_issue_*.py There are still 2 tests that should be adapted to Windows, but those are lower-prio in my eyes. Also, unittest run on my windows VM creates many resource warnings due to non-closed file descriptors. Should address that some (future) day.
-
Fix unittests
-
Some samples triggered antivirus engines, issues #215 and #217 ended with the agreement to encapsulate problematic samples in encrypted zip containers and decrypt them on-the-fly. Initial support for this was added but that did not cover 5 tests. Create on-the-fly decryption for these tests as well and re-enable them.
-
Before using log_helper in olevba logged a "finalization message", which is no longer required. Had forgotten to update unittests.
-
Oleobj preserve file extension
-
Files provided by decalage2
-
On my test VM this reduces test time for this one test from 33s to 10s
-
VBA stomping warning might occur here
-
Do not need the last meta-information return code json output from olevba any more
-
With the creation of ftguess oleid has been changed a lot, the output of its .check() method is very different. Instead of just adapting the existing unittests, I re-created the complete test, trying to make it easier to change/extend in the future.
-
File was created by myself, free to use