Add debug prints for channel details and packet frequency in get_clients_on_channel

This commit is contained in:
Yaro Kasear 2025-04-14 10:10:23 -05:00
parent 4e530b0a8f
commit eb74eb3962

View file

@ -110,6 +110,11 @@ def get_clients_on_channel(capture, ap_channel, ap_bssid):
print(f"[!] Could not parse channel number: {ap_channel}")
return 0
# For debugging purposes, we can print the channel details
channel_details = get_freq_details(ap_channel)
if channel_details:
print(f"[+] Channel {ap_channel} details: {channel_details}")
clients = set()
for packet in capture:
@ -123,6 +128,21 @@ def get_clients_on_channel(capture, ap_channel, ap_bssid):
packet_freq = int(getattr(radio, 'channel_freq', -1))
packet_channel = get_channel_from_freq(packet_freq)
# For debugging purposes, we can print the frequency and channel
if packet_channel:
print(f"[+] Packet Frequency: {packet_freq} MHz, Channel: {packet_channel}")
else:
print(f"[!] Packet Frequency: {packet_freq} MHz, Channel: Unknown")
if packet_channel == -1:
print(f"[!] Packet channel not found in lookup table.")
continue
if packet_channel == 0:
print(f"[!] Packet channel is zero, skipping.")
continue
if packet_channel == 255:
print(f"[!] Packet channel is 255, skipping.")
continue
if packet_channel != ap_channel:
continue