certly / yara
Installs: 1 395
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 2
Forks: 1
Open Issues: 0
Language:Hack
pkg:composer/certly/yara
Requires
- symfony/process: ^3.0
 
This package is not auto-updated.
Last update: 2025-11-03 17:02:56 UTC
README
A YARA wrapper for PHP. Requires that a yara executable exist in your PATH or in a path specified.
$yara = new Certly\YARA\YARA();
$matches = $yara->match('abcdef', [
    '
        rule silent_banker : banker
        {
            meta:
                description = "An example rule."
        
            strings:
                $a = "abc"
        
            condition:
                $a
        }
    ',
]));
foreach ($matches as $match) {
    echo "Matched {$match['rule']}." . PHP_EOL;
    echo "Raw output: {$match['raw']}" . PHP_EOL;
}