소스 검색

Virustotal arguments

tags/v1.0.0
Remco 7 년 전
부모
커밋
d6f225e232
2개의 변경된 파일16개의 추가작업 그리고 0개의 파일을 삭제
  1. +10
    -0
      cmd/cmd.go
  2. +6
    -0
      server/server.go

+ 10
- 0
cmd/cmd.go 파일 보기

@@ -117,6 +117,12 @@ var globalFlags = []cli.Flag{
Value: "",
EnvVar: "CLAMAV_HOST",
},
cli.StringFlag{
Name: "virustotal-key",
Usage: "virustotal-key",
Value: "",
EnvVar: "VIRUSTOTAL_KEY",
},
cli.BoolFlag{
Name: "profiler",
Usage: "enable profiling",
@@ -176,6 +182,10 @@ func New() *Cmd {
options = append(options, server.UseLetsEncrypt(strings.Split(v, ",")))
}

if v := c.String("virustotal-key"); v != "" {
options = append(options, server.VirustotalKey(v))
}

if v := c.String("clamav-host"); v != "" {
options = append(options, server.ClamavHost(v))
}


+ 6
- 0
server/server.go 파일 보기

@@ -66,6 +66,12 @@ func ClamavHost(s string) OptionFn {
}
}

func VirustotalKey(s string) OptionFn {
return func(srvr *Server) {
srvr.VirusTotalKey = s
}
}

func Listener(s string) OptionFn {
return func(srvr *Server) {
srvr.ListenerString = s


불러오는 중...
취소
저장