mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
fix: better dot11 sniffed packets visualization
This commit is contained in:
parent
e5a7accc9c
commit
73a1b28515
3 changed files with 35 additions and 16 deletions
|
@ -12,7 +12,10 @@ net.sniff on
|
|||
# interested in otherwise the sniffer might lose packets.
|
||||
set wifi.recon.channel 1
|
||||
|
||||
# this will enable the wifi recon
|
||||
set ticker.commands clear; wifi.show
|
||||
wifi.recon on
|
||||
ticker on
|
||||
|
||||
# uncomment to recon clients of a specific AP given its BSSID
|
||||
# wifi.recon DE:AD:BE:EF:DE:AD
|
||||
|
@ -29,3 +32,7 @@ clear
|
|||
# This will deauth every client for this specific access point,
|
||||
# you can put it as ticker.commands to have the ticker module
|
||||
# periodically deauth clients :D
|
||||
#
|
||||
# For more options `help wifi.recon`.
|
||||
|
||||
|
||||
|
|
28
modules/net_sniff_dot11.go
Normal file
28
modules/net_sniff_dot11.go
Normal file
|
@ -0,0 +1,28 @@
|
|||
package modules
|
||||
|
||||
import (
|
||||
"github.com/google/gopacket"
|
||||
"github.com/google/gopacket/layers"
|
||||
)
|
||||
|
||||
func dot11Parser(radiotap *layers.RadioTap, dot11 *layers.Dot11, pkt gopacket.Packet, verbose bool) {
|
||||
NewSnifferEvent(
|
||||
pkt.Metadata().Timestamp,
|
||||
"802.11",
|
||||
"-",
|
||||
"-",
|
||||
SniffData{
|
||||
"Size": len(pkt.Data()),
|
||||
},
|
||||
"%s %s proto=%d a1=%s a2=%s a3=%s a4=%s seqn=%d frag=%d",
|
||||
dot11.Type,
|
||||
dot11.Flags,
|
||||
dot11.Proto,
|
||||
dot11.Address1,
|
||||
dot11.Address2,
|
||||
dot11.Address3,
|
||||
dot11.Address4,
|
||||
dot11.SequenceNumber,
|
||||
dot11.FragmentNumber,
|
||||
).Push()
|
||||
}
|
|
@ -86,22 +86,6 @@ func unkParser(ip *layers.IPv4, pkt gopacket.Packet, verbose bool) {
|
|||
}
|
||||
}
|
||||
|
||||
func dot11Parser(radiotap *layers.RadioTap, dot11 *layers.Dot11, pkt gopacket.Packet, verbose bool) {
|
||||
if verbose == true {
|
||||
NewSnifferEvent(
|
||||
pkt.Metadata().Timestamp,
|
||||
"802.11",
|
||||
"-",
|
||||
"-",
|
||||
SniffData{
|
||||
"Size": len(pkt.Data()),
|
||||
},
|
||||
"%v",
|
||||
dot11,
|
||||
).Push()
|
||||
}
|
||||
}
|
||||
|
||||
func mainParser(pkt gopacket.Packet, verbose bool) bool {
|
||||
// simple networking sniffing mode?
|
||||
nlayer := pkt.NetworkLayer()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue