mirror of
https://github.com/bettercap/bettercap
synced 2025-08-21 05:53:20 -07:00
new: integrated net.sniff events into main events system ( with new.sniff.leak.* even type )
This commit is contained in:
parent
5bc00fb126
commit
e8c6c7cf92
6 changed files with 115 additions and 28 deletions
|
@ -31,11 +31,20 @@ func sniParser(ip *layers.IPv4, pkt gopacket.Packet, tcp *layers.TCP) bool {
|
|||
domain = fmt.Sprintf("%s:%d", domain, tcp.DstPort)
|
||||
}
|
||||
|
||||
SniffPrinter("[%s] %s %s > %s\n",
|
||||
NewSnifferEvent(
|
||||
pkt.Metadata().Timestamp,
|
||||
"sni",
|
||||
ip.SrcIP.String(),
|
||||
domain,
|
||||
SniffData{
|
||||
"Domain": domain,
|
||||
},
|
||||
"[%s] %s %s > %s",
|
||||
vTime(pkt.Metadata().Timestamp),
|
||||
core.W(core.BG_YELLOW+core.FG_WHITE, "sni"),
|
||||
vIP(ip.SrcIP),
|
||||
core.Yellow("https://"+domain))
|
||||
core.Yellow("https://"+domain),
|
||||
).Push()
|
||||
|
||||
return true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue