zgrab2/multiple.go

24 lines
768 B
Go
Raw Normal View History

package zgrab2
import "errors"
2017-10-04 03:57:56 +00:00
// MultipleCommand contains the command line options for running
2017-08-30 18:53:42 +00:00
type MultipleCommand struct {
ConfigFileName string `short:"c" long:"config-file" default:"-" description:"Config filename, use - for stdin"`
ContinueOnError bool `long:"continue-on-error" description:"If proceeding protocols error, do not run following protocols (default: true)"`
}
2017-10-04 03:57:56 +00:00
// Validate the options sent to MultipleCommand
2017-08-30 18:53:42 +00:00
func (x *MultipleCommand) Validate(args []string) error {
if x.ConfigFileName == config.InputFileName {
return errors.New("cannot receive config file and input file from same source")
}
return nil
}
2017-10-04 03:57:56 +00:00
// Help returns a usage string that will be output at the command line
func (x *MultipleCommand) Help() string {
return ""
}