Closed Derekt2 closed 1 year ago
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
This adds YARA statistics to this python library. Addresses: https://github.com/VirusTotal/yara-python/issues/224
After a ruleset is compiled, a new method may be called
.stats()
as follows:which produces output:
{'num_rules': 2, 'num_strings': 2, 'ac_matches': 2, 'ac_tables_size': 512}
exactly as if you used the YARA command line flag--print-stats
I verified the code works locally, but apologies if I missed styling or best practices as this is my first stab at C.