MCPcopy Index your code
hub / github.com/codeyourweb/irma / WindowsFileSystemAnalysisRoutine

Function WindowsFileSystemAnalysisRoutine

filehelper.go:15–35  ·  view source on GitHub ↗

WindowsFileSystemAnalysisRoutine analyse windows filesystem every 300 seconds

(pQuarantine string, pKill bool, pNotifications bool, pVerbose bool, pInfiniteLoop bool, rules *yara.Rules)

Source from the content-addressed store, hash-verified

13
14// WindowsFileSystemAnalysisRoutine analyse windows filesystem every 300 seconds
15func 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
38func UserFileSystemAnalysisRoutine(pQuarantine string, pKill bool, pNotifications bool, pVerbose bool, pInfiniteLoop bool, rules *yara.Rules) {

Callers 1

mainFunction · 0.85

Calls 3

ListEnvironmentPathFilesFunction · 0.85
ListTemporaryFilesFunction · 0.85
FileAnalysisFunction · 0.85

Tested by

no test coverage detected