Skip to content

Instantly share code, notes, and snippets.

@bats3c
Created September 4, 2020 16:15
Show Gist options
  • Save bats3c/57487d55bd2a717fb32f9680d1c7cd64 to your computer and use it in GitHub Desktop.
Save bats3c/57487d55bd2a717fb32f9680d1c7cd64 to your computer and use it in GitHub Desktop.
Basic Yara Usage
#define RULE_ALLOW_ALL "rule Allow { condition: false }"
YRInitalize();
RtlCopyMemory(cRule, RULE_ALLOW_ALL, strlen(RULE_ALLOW_ALL));
if (YRCompilerCreate(&yrCompiler) != ERROR_SUCCESS)
{
return -1;
}
if (YRCompilerAddString(yrCompiler, cRule, NULL) != ERROR_SUCCESS)
{
return -1;
}
YRCompilerGetRules(yrCompiler, &yrRules);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment