mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
yeah i should have done this before, i know
This commit is contained in:
commit
0091ffdbb3
33 changed files with 25678 additions and 0 deletions
25
core/options.go
Normal file
25
core/options.go
Normal 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue