(binaryPath string, conf map[string]string)
| 110 | } |
| 111 | |
| 112 | func CheckMal(binaryPath string, conf map[string]string) (string, error) { |
| 113 | // Check for Detection |
| 114 | scanResult, err := scanFile(binaryPath, conf) |
| 115 | if err != nil { |
| 116 | return "", err |
| 117 | } |
| 118 | |
| 119 | if !scanResult { |
| 120 | return "Not malicious", nil |
| 121 | } |
| 122 | |
| 123 | static, err := checkStatic(binaryPath, conf) |
| 124 | if err != nil { |
| 125 | return "", err |
| 126 | } |
| 127 | |
| 128 | if static != "" { |
| 129 | return static, nil |
| 130 | } |
| 131 | |
| 132 | return "Whole file is malicious", nil |
| 133 | } |
no test coverage detected