mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
Update wifi channels
This commit is contained in:
@ -130,10 +130,10 @@ def merge_config(user, default):
|
||||
|
||||
|
||||
def keys_to_str(data):
|
||||
if isinstance(data,list):
|
||||
if isinstance(data, list):
|
||||
converted_list = list()
|
||||
for item in data:
|
||||
if isinstance(item,list) or isinstance(item,dict):
|
||||
if isinstance(item, list) or isinstance(item, dict):
|
||||
converted_list.append(keys_to_str(item))
|
||||
else:
|
||||
converted_list.append(item)
|
||||
@ -277,7 +277,8 @@ def load_config(args):
|
||||
elif config['ui']['display']['type'] in ('ws_154inch', 'ws154inch', 'waveshare_154inch', 'waveshare154inch'):
|
||||
config['ui']['display']['type'] = 'waveshare154inch'
|
||||
|
||||
elif config['ui']['display']['type'] in ('waveshare144lcd', 'ws_144inch', 'ws144inch', 'waveshare_144inch', 'waveshare144inch'):
|
||||
elif config['ui']['display']['type'] in (
|
||||
'waveshare144lcd', 'ws_144inch', 'ws144inch', 'waveshare_144inch', 'waveshare144inch'):
|
||||
config['ui']['display']['type'] = 'waveshare144lcd'
|
||||
|
||||
elif config['ui']['display']['type'] in ('ws_213d', 'ws213d', 'waveshare_213d', 'waveshare213d'):
|
||||
@ -285,7 +286,7 @@ def load_config(args):
|
||||
|
||||
elif config['ui']['display']['type'] in ('ws_213bc', 'ws213bc', 'waveshare_213bc', 'waveshare213bc'):
|
||||
config['ui']['display']['type'] = 'waveshare213bc'
|
||||
|
||||
|
||||
elif config['ui']['display']['type'] in ('ws_213bv4', 'ws213bv4', 'waveshare_213bv4', 'waveshare213inb_v4'):
|
||||
config['ui']['display']['type'] = 'waveshare213inb_v4'
|
||||
|
||||
@ -318,7 +319,8 @@ def total_unique_handshakes(path):
|
||||
|
||||
def iface_channels(ifname):
|
||||
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"):
|
||||
line = line.strip()
|
||||
if line.startswith("Channel "):
|
||||
|
Reference in New Issue
Block a user