YaraScan use libyara to scan the specified content with a compiled rule
(content []byte, rules *yara.Rules)
| 125 | |
| 126 | // YaraScan use libyara to scan the specified content with a compiled rule |
| 127 | func YaraScan(content []byte, rules *yara.Rules) (match yara.MatchRules, err error) { |
| 128 | sc, _ := yara.NewScanner(rules) |
| 129 | var m yara.MatchRules |
| 130 | err = sc.SetCallback(&m).ScanMem(content) |
| 131 | return m, err |
| 132 | } |
no outgoing calls
no test coverage detected