You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to count the number of occurrences of a string in the file context, capa crashes with an exception when trying to create a new Feature() object.
Steps to Reproduce
Create a capa rule with the following:
rule:
meta:
name: test
namespace: test
scope: file
features:
- count(string("This program cannot be run in DOS mode")): 1
Run this rule against any PE fle using the -r option
Expected behavior:
Either display whether the file matched the given count rule, or display a message saying that count isn't supported in the file scope.
Actual behavior:
Capa crashes with the following exception:
Versions
capa 1.1.0 for linux (running on ubuntu 18.04)
Additional Information
None
The text was updated successfully, but these errors were encountered:
I think this is because StringFactory has a required argument description but when it is invoked here the description is not provided - hence the TypeError.
I think we can fix this by making StringFactory description a kwarg with default value.
Description
When attempting to count the number of occurrences of a string in the file context, capa crashes with an exception when trying to create a new Feature() object.
Steps to Reproduce
Expected behavior:
Either display whether the file matched the given count rule, or display a message saying that count isn't supported in the file scope.
Actual behavior:
Capa crashes with the following exception:
Versions
capa 1.1.0 for linux (running on ubuntu 18.04)
Additional Information
None
The text was updated successfully, but these errors were encountered: