new: implemented events.stream.output (closes #169). new: implemented -no-colors argument.

This commit is contained in:
evilsocket 2018-03-13 13:20:21 +01:00
parent b63c20b757
commit e40219976c
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
9 changed files with 97 additions and 56 deletions

21
main.go
View file

@ -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 {