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 (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"sort"
|
// "sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/evilsocket/bettercap-ng/core"
|
"github.com/evilsocket/bettercap-ng/core"
|
||||||
|
@ -37,25 +37,12 @@ func (s EventsStream) viewModuleEvent(e session.Event) {
|
||||||
|
|
||||||
func (s EventsStream) viewSnifferEvent(e session.Event) {
|
func (s EventsStream) viewSnifferEvent(e session.Event) {
|
||||||
se := e.Data.(SnifferEvent)
|
se := e.Data.(SnifferEvent)
|
||||||
|
fmt.Printf("[%s] [%s] %s > %s | %s\n",
|
||||||
fmt.Printf("[%s] [%s] %s > %s | ",
|
|
||||||
e.Time.Format(eventTimeFormat),
|
e.Time.Format(eventTimeFormat),
|
||||||
core.Green(e.Tag),
|
core.Green(e.Tag),
|
||||||
se.Source,
|
se.Source,
|
||||||
se.Destination)
|
se.Destination,
|
||||||
|
se.Message)
|
||||||
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()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *EventsStream) View(e session.Event, refresh bool) {
|
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() {
|
func (e SnifferEvent) Push() {
|
||||||
fmt.Printf("%s\n", e.Message)
|
|
||||||
session.I.Events.Add("net.sniff.leak."+e.Protocol, e)
|
session.I.Events.Add("net.sniff.leak."+e.Protocol, e)
|
||||||
session.I.Refresh()
|
session.I.Refresh()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue