Will this get me channel?

This commit is contained in:
Yaro Kasear 2025-04-11 10:32:26 -05:00
parent cf8c6790a5
commit 225fb90854

View file

@ -47,10 +47,14 @@ def analyze_radiotap_info(pcapng_path, limit=100):
else:
print(" Estimated SNR: [incomplete data]")
if channel:
print(f" Channel/Frequency: {channel}")
channel_str = getattr(packet.radiotap, 'channel', None)
if channel_str:
try:
print(f" Channel/Frequency: {channel_str.showname_value}")
except AttributeError:
print(f" Channel/Frequency: {str(channel_str)}")
else:
print(" Channel/Frequency: [unavailable]")
print(" Channel/Frequency: [unavailable]")
if rate:
print(f" Data Rate: {rate} Mbps")