Update wifi

This commit is contained in:
Jeroen Oudshoorn
2024-01-05 22:00:28 +01:00
parent 9c0c5f4148
commit 88668fb4f8

View File

@ -320,7 +320,7 @@ def total_unique_handshakes(path):
def iface_channels(ifname):
channels = []
phy = subprocess.getoutput("/sbin/iw %s info | grep wiphy | cut -d ' ' -f 2" % ifname)
output = subprocess.getoutput("/sbin/iw phy%s channels | grep ' MHz' | sed 's/^.*\[//g' | sed s/\].*\$//g" % phy)
output = subprocess.getoutput("/sbin/iw phy%s channels | grep ' MHz' | grep -v disabled | sed 's/^.*\[//g' | sed s/\].*\$//g" % phy)
for line in output.split("\n"):
line = line.strip()
channels.append(int(line))