mirror of
https://github.com/bettercap/bettercap
synced 2025-07-06 04:52:10 -07:00
new: implemented events.stream.output (closes #169). new: implemented -no-colors argument.
This commit is contained in:
parent
b63c20b757
commit
e40219976c
9 changed files with 97 additions and 56 deletions
21
main.go
21
main.go
|
@ -27,8 +27,12 @@ func main() {
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
if core.NoColors == true {
|
||||
fmt.Printf("\n\nWARNING: This terminal does not support colors, view will be very limited.\n\n")
|
||||
if core.HasColors == false {
|
||||
if *sess.Options.NoColors == true {
|
||||
fmt.Printf("\n\nWARNING: Terminal colors have been disabled, view will be very limited.\n\n")
|
||||
} else {
|
||||
fmt.Printf("\n\nWARNING: This terminal does not support colors, view will be very limited.\n\n")
|
||||
}
|
||||
}
|
||||
|
||||
appName := fmt.Sprintf("%s v%s", core.Name, core.Version)
|
||||
|
@ -59,12 +63,6 @@ func main() {
|
|||
log.Fatal("%s", err)
|
||||
}
|
||||
|
||||
for _, modName := range autoEnableList {
|
||||
if err = sess.Run(modName + " on"); err != nil {
|
||||
log.Fatal("Error while starting module %s: %", modName, err)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Commands sent with -eval are used to set specific
|
||||
* caplet parameters (i.e. arp.spoof.targets) via command
|
||||
|
@ -77,6 +75,13 @@ func main() {
|
|||
}
|
||||
}
|
||||
|
||||
// Start modules that are enabled by default.
|
||||
for _, modName := range autoEnableList {
|
||||
if err = sess.Run(modName + " on"); err != nil {
|
||||
log.Fatal("Error while starting module %s: %", modName, err)
|
||||
}
|
||||
}
|
||||
|
||||
// Then run the caplet if specified.
|
||||
if *sess.Options.Caplet != "" {
|
||||
if err = sess.RunCaplet(*sess.Options.Caplet); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue