mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
balls
This commit is contained in:
parent
3672906491
commit
bd591855cd
2 changed files with 3 additions and 5 deletions
3
main.go
3
main.go
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue