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
|
@ -1,6 +1,7 @@
|
|||
package net_sniff
|
||||
|
||||
import (
|
||||
"net"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
|
@ -31,7 +32,7 @@ func isResponse(s string) bool {
|
|||
return respRe.FindString(s) != ""
|
||||
}
|
||||
|
||||
func ntlmParser(ip *layers.IPv4, pkt gopacket.Packet, tcp *layers.TCP) bool {
|
||||
func ntlmParser(srcIP, dstIP net.IP, payload []byte, pkt gopacket.Packet, tcp *layers.TCP) bool {
|
||||
data := tcp.Payload
|
||||
ok := false
|
||||
|
||||
|
@ -50,13 +51,13 @@ func ntlmParser(ip *layers.IPv4, pkt gopacket.Packet, tcp *layers.TCP) bool {
|
|||
NewSnifferEvent(
|
||||
pkt.Metadata().Timestamp,
|
||||
"ntlm.response",
|
||||
ip.SrcIP.String(),
|
||||
ip.DstIP.String(),
|
||||
srcIP.String(),
|
||||
dstIP.String(),
|
||||
nil,
|
||||
"%s %s > %s | %s",
|
||||
tui.Wrap(tui.BACKDARKGRAY+tui.FOREWHITE, "ntlm.response"),
|
||||
vIP(ip.SrcIP),
|
||||
vIP(ip.DstIP),
|
||||
vIP(srcIP),
|
||||
vIP(dstIP),
|
||||
data.LcString(),
|
||||
).Push()
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue