From e36ea214a1bd6c041e9386cd7c6c47ae78b783a0 Mon Sep 17 00:00:00 2001 From: evilsocket Date: Fri, 16 Feb 2018 22:33:47 +0100 Subject: [PATCH] misc: small fix or general refactoring i did not bother commenting --- modules/wifi_recon.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/wifi_recon.go b/modules/wifi_recon.go index ac41dfd7..fcc417ef 100644 --- a/modules/wifi_recon.go +++ b/modules/wifi_recon.go @@ -393,6 +393,10 @@ func (w *WDiscovery) updateStats(packet gopacket.Packet) { dot11, _ := dot11Layer.(*layers.Dot11) + // FIXME: This doesn't consider the actual direction of the + // packet (which address is the source, which the destination, + // etc). It should be fixed and counter splitted into two + // separete "Recvd" and "Sent" uint64 counters. bytes := uint64(len(packet.Data())) w.stats.Collect(dot11.Address1, bytes) w.stats.Collect(dot11.Address2, bytes)