Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions clamd.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (
const (
RES_OK = "OK"
RES_FOUND = "FOUND"
RES_EXCLUDED = "Excluded"
RES_ERROR = "ERROR"
RES_PARSE_ERROR = "PARSE ERROR"
)
Expand Down
3 changes: 2 additions & 1 deletion conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const CHUNK_SIZE = 1024
const TCP_TIMEOUT = time.Second * 2

var resultRegex = regexp.MustCompile(
`^(?P<path>[^:]+): ((?P<desc>[^:]+)(\((?P<virhash>([^:]+)):(?P<virsize>\d+)\))? )?(?P<status>FOUND|ERROR|OK)$`,
`^(?P<path>[^:]+): ((?P<desc>[^:]+)(\((?P<virhash>([^:]+)):(?P<virsize>\d+)\))? )?(?P<status>FOUND|ERROR|OK|Excluded)$`,
)

type CLAMDConn struct {
Expand Down Expand Up @@ -140,6 +140,7 @@ func parseResult(line string) *ScanResult {
switch matches[i] {
case RES_OK:
case RES_FOUND:
case RES_EXCLUDED:
case RES_ERROR:
break
default:
Expand Down