fix: fixed weird bug happening while clearing the interactive session screen

This commit is contained in:
evilsocket 2018-01-24 12:55:41 +01:00
commit 268c646606

View file

@ -157,6 +157,12 @@ func (s *Session) setHandler(args []string, sess *Session) error {
}
func (s *Session) clsHandler(args []string, sess *Session) error {
// fixes a weird bug which causes the screen not to be fully
// cleared if a "clear; net.show" commands chain is executed
// in the interactive session.
for i := 0; i < 80; i++ {
fmt.Println()
}
readline.ClearScreen(s.Input.Stdout())
return nil
}