new: printing a big warning if the terminal does not support colors

This commit is contained in:
evilsocket 2018-02-08 07:45:03 +01:00
parent 09df8e4de3
commit c1280107fb
2 changed files with 4 additions and 1 deletions

View file

@ -20,6 +20,10 @@ func main() {
os.Exit(1) os.Exit(1)
} }
if core.NoColors == true {
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) fmt.Printf(core.Bold("%s v%s\n\n"), core.Name, core.Version)
sess.Register(modules.NewEventsStream(sess)) sess.Register(modules.NewEventsStream(sess))

View file

@ -208,7 +208,6 @@ func (s *Session) Start() error {
s.Env.Set("iface.mac", s.Interface.HwAddress) s.Env.Set("iface.mac", s.Interface.HwAddress)
if s.Queue, err = packets.NewQueue(s.Interface); err != nil { if s.Queue, err = packets.NewQueue(s.Interface); err != nil {
fmt.Printf("iface = '%s'\n", s.Interface.Name())
return err return err
} }