yeah i should have done this before, i know

This commit is contained in:
evilsocket 2017-11-17 14:49:59 +01:00
commit 0091ffdbb3
33 changed files with 25678 additions and 0 deletions

25
core/options.go Normal file
View file

@ -0,0 +1,25 @@
package core
import "flag"
type Options struct {
InterfaceName *string
Caplet *string
Debug *bool
Silent *bool
NoHistory *bool
}
func ParseOptions() (Options, error) {
o := Options{
InterfaceName: flag.String("iface", "", "Network interface to bind to."),
Caplet: flag.String("caplet", "", "Read commands from this file instead of goin into interactive mode."),
Debug: flag.Bool("debug", false, "Print debug messages."),
Silent: flag.Bool("silent", false, "Suppress all logs which are not errors."),
NoHistory: flag.Bool("no-history", false, "Disable history file."),
}
flag.Parse()
return o, nil
}