mirror of
https://github.com/bettercap/bettercap
synced 2025-07-05 20:42:09 -07:00
25 lines
675 B
Go
25 lines
675 B
Go
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
|
|
}
|