We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4a73404 + f739ecc commit 90b405cCopy full SHA for 90b405c
cmd/procAll.go
@@ -4,6 +4,7 @@ import (
4
"fmt"
5
"os"
6
"path/filepath"
7
+ "strings"
8
9
"github.com/slimm609/checksec/pkg/utils"
10
@@ -22,11 +23,15 @@ var procAllCmd = &cobra.Command{
22
23
processes, _ := process.Processes()
24
for _, process := range processes {
25
proc := process.Pid
26
+ // skip checksec
27
+ if proc == int32(os.Getpid()) {
28
+ continue
29
+ }
30
filePath := filepath.Join("/proc", fmt.Sprint(proc), "exe")
31
file, err := os.Readlink(filePath)
32
+ file = strings.Split(file, " ")[0]
33
if err != nil {
- fmt.Printf("Error: Pid %d not found", proc)
- os.Exit(1)
34
35
}
36
data, color := utils.RunFileChecks(file)
37
Elements = append(Elements, data...)
0 commit comments