This commit is contained in:
evilsocket 2018-02-08 01:33:50 +01:00
parent 3672906491
commit bd591855cd
2 changed files with 3 additions and 5 deletions

@ -62,6 +62,7 @@ func main() {
}
for sess.Active {
fmt.Printf("sess.Active = %v\n", sess.Active)
line, err := sess.ReadLine()
if err != nil {
if err == io.EOF {
@ -76,4 +77,6 @@ func main() {
}
}
}
fmt.Println("All done")
}

@ -95,18 +95,13 @@ func (s *Session) activeHandler(args []string, sess *Session) error {
func (s *Session) exitHandler(args []string, sess *Session) error {
for _, mod := range s.Modules {
fmt.Println("loop")
if mod.Running() {
fmt.Printf("Stopping %s\n", mod.Name())
mod.Stop()
fmt.Printf("DONE\n")
}
}
fmt.Printf("Closing input\n")
s.Active = false
s.Input.Close()
fmt.Printf("input closed\n")
return nil
}