mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 21:43:18 -07:00
fix: removed forced sniffer Printf
This commit is contained in:
parent
ca9f4f0945
commit
db04e21316
2 changed files with 4 additions and 18 deletions
|
@ -2,7 +2,7 @@ package modules
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
// "sort"
|
||||
"strings"
|
||||
|
||||
"github.com/evilsocket/bettercap-ng/core"
|
||||
|
@ -37,25 +37,12 @@ func (s EventsStream) viewModuleEvent(e session.Event) {
|
|||
|
||||
func (s EventsStream) viewSnifferEvent(e session.Event) {
|
||||
se := e.Data.(SnifferEvent)
|
||||
|
||||
fmt.Printf("[%s] [%s] %s > %s | ",
|
||||
fmt.Printf("[%s] [%s] %s > %s | %s\n",
|
||||
e.Time.Format(eventTimeFormat),
|
||||
core.Green(e.Tag),
|
||||
se.Source,
|
||||
se.Destination)
|
||||
|
||||
keys := make([]string, 0)
|
||||
for k, _ := range se.Data {
|
||||
keys = append(keys, k)
|
||||
}
|
||||
|
||||
sort.Strings(keys)
|
||||
|
||||
for _, k := range keys {
|
||||
fmt.Printf("%s=%s ", core.Green(k), se.Data[k])
|
||||
}
|
||||
|
||||
fmt.Println()
|
||||
se.Destination,
|
||||
se.Message)
|
||||
}
|
||||
|
||||
func (s *EventsStream) View(e session.Event, refresh bool) {
|
||||
|
|
|
@ -30,7 +30,6 @@ func NewSnifferEvent(t time.Time, proto string, src string, dst string, data Sni
|
|||
}
|
||||
|
||||
func (e SnifferEvent) Push() {
|
||||
fmt.Printf("%s\n", e.Message)
|
||||
session.I.Events.Add("net.sniff.leak."+e.Protocol, e)
|
||||
session.I.Refresh()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue