PerformYaraScan use provided YARA rules and search for match in the given byte slice
(data *[]byte, rules *yara.Rules, verbose bool)
| 13 | |
| 14 | // PerformYaraScan use provided YARA rules and search for match in the given byte slice |
| 15 | func PerformYaraScan(data *[]byte, rules *yara.Rules, verbose bool) yara.MatchRules { |
| 16 | result, err := YaraScan(*data, rules) |
| 17 | if err != nil && verbose { |
| 18 | logMessage(LOG_ERROR, "[ERROR]", err) |
| 19 | } |
| 20 | |
| 21 | return result |
| 22 | } |
| 23 | |
| 24 | // PerformArchiveYaraScan try to decompress archive and YARA scan every file in it |
| 25 | func PerformArchiveYaraScan(path string, rules *yara.Rules, verbose bool) (matchs yara.MatchRules) { |
no test coverage detected