mirror of
https://github.com/bettercap/bettercap
synced 2025-07-06 04:52:10 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
47230567ba
commit
1847eb3b52
1 changed files with 10 additions and 7 deletions
17
main.go
17
main.go
|
@ -14,6 +14,13 @@ import (
|
|||
var sess *session.Session
|
||||
var err error
|
||||
|
||||
// Some modules are enabled by default in order
|
||||
// to make the interactive session useful.
|
||||
var autoEnableList = []string{
|
||||
"events.stream",
|
||||
"net.recon",
|
||||
}
|
||||
|
||||
func main() {
|
||||
if sess, err = session.New(); err != nil {
|
||||
fmt.Println(err)
|
||||
|
@ -24,7 +31,9 @@ func main() {
|
|||
fmt.Printf("\n\nWARNING: This terminal does not support colors, view will be very limited.\n\n")
|
||||
}
|
||||
|
||||
fmt.Printf(core.Bold("%s v%s\n\n"), core.Name, core.Version)
|
||||
appName := fmt.Sprintf("%s v%s", core.Name, core.Version)
|
||||
|
||||
fmt.Printf("%s (type '%s' for a list of commands)\n\n", core.Bold(appName), core.Bold("help"))
|
||||
|
||||
sess.Register(modules.NewEventsStream(sess))
|
||||
sess.Register(modules.NewTicker(sess))
|
||||
|
@ -45,12 +54,6 @@ func main() {
|
|||
log.Fatal("%s", err)
|
||||
}
|
||||
|
||||
// Some modules are enabled by default in order
|
||||
// to make the interactive session useful.
|
||||
autoEnableList := []string{
|
||||
"events.stream",
|
||||
"net.recon",
|
||||
}
|
||||
for _, modName := range autoEnableList {
|
||||
if err = sess.Run(modName + " on"); err != nil {
|
||||
log.Fatal("Error while starting module %s: %", modName, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue