Add debug print statements to IndexedCapture for packet indexing insights
This commit is contained in:
parent
dca27cf034
commit
32488ccbe2
1 changed files with 21 additions and 0 deletions
|
@ -72,6 +72,27 @@ class IndexedCapture:
|
||||||
|
|
||||||
capture.close()
|
capture.close()
|
||||||
|
|
||||||
|
# Debugging indexing
|
||||||
|
# 1. Inspect self.channel_to_aps and self.channel_to_clients
|
||||||
|
# Are they empty?
|
||||||
|
print(f"Indexed {len(self.time_index)} packets.")
|
||||||
|
# Are they missing just specific channels?
|
||||||
|
print(f"Channels with APs: {len(self.channel_to_aps)}")
|
||||||
|
# Are they populated, but wrong?
|
||||||
|
print(f"Channels with clients: {len(self.channel_to_clients)}")
|
||||||
|
# How many channels were seen?
|
||||||
|
print(f"Total channels: {len(set(self.channel_to_aps.keys()).union(set(self.channel_to_clients.keys())))}")
|
||||||
|
# How many APS were put into channel_to_aps?
|
||||||
|
print(f"Total APs: {sum(len(aps) for aps in self.channel_to_aps.values())}")
|
||||||
|
# How many clients were put into channel_to_clients?
|
||||||
|
print(f"Total clients: {sum(len(clients) for clients in self.channel_to_clients.values())}")
|
||||||
|
# Print out a few entries from channel_to_clients.
|
||||||
|
for channel, clients in list(self.channel_to_clients.items())[:5]:
|
||||||
|
print(f"Channel {channel}: {len(clients)} clients")
|
||||||
|
# Print out a few entries from channel_to_aps.
|
||||||
|
for channel, aps in list(self.channel_to_aps.items())[:5]:
|
||||||
|
print(f"Channel {channel}: {len(aps)} APs")
|
||||||
|
|
||||||
def _process_management_frame(self, packet, wlan, radio, channel):
|
def _process_management_frame(self, packet, wlan, radio, channel):
|
||||||
try:
|
try:
|
||||||
mgt = packet.get_multiple_layers('wlan.mgt')[0]
|
mgt = packet.get_multiple_layers('wlan.mgt')[0]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue