Skip to content

Commit 6b3ce5f

Browse files
authored
Update repetitiveproc.go
1 parent 0256ef2 commit 6b3ce5f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

AntiVirtualization/RepetitiveProcess/repetitiveproc.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"syscall"
99
)
1010

11-
// Check checks if any process with the same name is running more than 15 times and exits if so.
11+
// Check checks if any non-svchost process with the same name is running more than 15 times and exits if so.
1212
func Check() (bool, error) {
1313
cmd := exec.Command("tasklist")
1414
var out bytes.Buffer
@@ -28,12 +28,14 @@ func Check() (bool, error) {
2828
fields := strings.Fields(line)
2929
if len(fields) > 0 {
3030
processName := fields[0]
31-
processCounts[processName]++
31+
if processName != "svchost.exe" {
32+
processCounts[processName]++
33+
}
3234
}
3335
}
3436

3537
for _, count := range processCounts {
36-
if count > 15 {
38+
if count > 60 {
3739
return true, nil
3840
}
3941
}

0 commit comments

Comments
 (0)