mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2020-11-18 19:53:40 -08:00
Virustotal arguments
This commit is contained in:
parent
7471990ef5
commit
d6f225e232
10
cmd/cmd.go
10
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))
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user