mirror of
https://github.com/bettercap/bettercap
synced 2025-08-21 05:53:20 -07:00
new: net.sniff now supports ipv6
This commit is contained in:
parent
bef4c6abaa
commit
cbc1432358
13 changed files with 122 additions and 83 deletions
|
@ -2,6 +2,7 @@ package net_sniff
|
|||
|
||||
import (
|
||||
"encoding/asn1"
|
||||
"net"
|
||||
|
||||
"github.com/bettercap/bettercap/packets"
|
||||
|
||||
|
@ -11,7 +12,7 @@ import (
|
|||
"github.com/evilsocket/islazy/tui"
|
||||
)
|
||||
|
||||
func krb5Parser(ip *layers.IPv4, pkt gopacket.Packet, udp *layers.UDP) bool {
|
||||
func krb5Parser(srcIP, dstIP net.IP, payload []byte, pkt gopacket.Packet, udp *layers.UDP) bool {
|
||||
if udp.DstPort != 88 {
|
||||
return false
|
||||
}
|
||||
|
@ -26,13 +27,13 @@ func krb5Parser(ip *layers.IPv4, pkt gopacket.Packet, udp *layers.UDP) bool {
|
|||
NewSnifferEvent(
|
||||
pkt.Metadata().Timestamp,
|
||||
"krb5",
|
||||
ip.SrcIP.String(),
|
||||
ip.DstIP.String(),
|
||||
srcIP.String(),
|
||||
dstIP.String(),
|
||||
nil,
|
||||
"%s %s -> %s : %s",
|
||||
tui.Wrap(tui.BACKRED+tui.FOREBLACK, "krb-as-req"),
|
||||
vIP(ip.SrcIP),
|
||||
vIP(ip.DstIP),
|
||||
vIP(srcIP),
|
||||
vIP(dstIP),
|
||||
s,
|
||||
).Push()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue