mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 13:33:21 -07:00
new: modules enabled by default can now be controlled with the -autostart argument
This commit is contained in:
parent
72ac7e63fc
commit
5727fa3c56
3 changed files with 17 additions and 5 deletions
9
main.go
9
main.go
|
@ -14,8 +14,6 @@ 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",
|
||||
|
@ -75,10 +73,11 @@ func main() {
|
|||
}
|
||||
}
|
||||
|
||||
// Start modules that are enabled by default.
|
||||
for _, modName := range autoEnableList {
|
||||
// Some modules are enabled by default in order
|
||||
// to make the interactive session useful.
|
||||
for _, modName := range core.CommaSplit(*sess.Options.AutoStart) {
|
||||
if err = sess.Run(modName + " on"); err != nil {
|
||||
log.Fatal("Error while starting module %s: %", modName, err)
|
||||
log.Fatal("Error while starting module %s: %s", modName, err)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue