WindowsFileSystemAnalysisRoutine analyse windows filesystem every 300 seconds
(pQuarantine string, pKill bool, pNotifications bool, pVerbose bool, pInfiniteLoop bool, rules *yara.Rules)
| 13 | |
| 14 | // WindowsFileSystemAnalysisRoutine analyse windows filesystem every 300 seconds |
| 15 | func WindowsFileSystemAnalysisRoutine(pQuarantine string, pKill bool, pNotifications bool, pVerbose bool, pInfiniteLoop bool, rules *yara.Rules) { |
| 16 | for { |
| 17 | env := ListEnvironmentPathFiles(pVerbose) |
| 18 | temp := ListTemporaryFiles(pVerbose) |
| 19 | |
| 20 | for _, p := range env { |
| 21 | FileAnalysis(p, pQuarantine, pKill, pNotifications, pVerbose, rules, "ENV") |
| 22 | } |
| 23 | |
| 24 | for _, p := range temp { |
| 25 | FileAnalysis(p, pQuarantine, pKill, pNotifications, pVerbose, rules, "TEMP") |
| 26 | } |
| 27 | |
| 28 | if !pInfiniteLoop { |
| 29 | wg.Done() |
| 30 | break |
| 31 | } else { |
| 32 | time.Sleep(300 * time.Second) |
| 33 | } |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | // UserFileSystemAnalysisRoutine analyse windows filesystem every 60 seconds |
| 38 | func UserFileSystemAnalysisRoutine(pQuarantine string, pKill bool, pNotifications bool, pVerbose bool, pInfiniteLoop bool, rules *yara.Rules) { |
no test coverage detected