mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 05:23:19 -07:00
refact: refactored sniffer to allow several parsers
This commit is contained in:
parent
74867aaae4
commit
55b9b1f189
5 changed files with 235 additions and 180 deletions
16
modules/net_sniff_parsers.go
Normal file
16
modules/net_sniff_parsers.go
Normal file
|
@ -0,0 +1,16 @@
|
|||
package modules
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
// "github.com/evilsocket/bettercap-ng/session"
|
||||
"github.com/google/gopacket"
|
||||
)
|
||||
|
||||
type SnifferPacketParser func(pkt gopacket.Packet) bool
|
||||
|
||||
var PacketParsers = []SnifferPacketParser{}
|
||||
|
||||
func noParser(pkt gopacket.Packet) bool {
|
||||
fmt.Println(pkt.Dump())
|
||||
return true
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue