mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
changed channel detection to detect all channels. iwlist only returns the first 32
This commit is contained in:
@ -304,11 +304,13 @@ def total_unique_handshakes(path):
|
|||||||
|
|
||||||
def iface_channels(ifname):
|
def iface_channels(ifname):
|
||||||
channels = []
|
channels = []
|
||||||
output = subprocess.getoutput("/sbin/iwlist %s freq" % ifname)
|
|
||||||
|
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)
|
||||||
for line in output.split("\n"):
|
for line in output.split("\n"):
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
if line.startswith("Channel "):
|
channels.append(int(line))
|
||||||
channels.append(int(line.split()[1]))
|
|
||||||
return channels
|
return channels
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user