1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-08-10 22:41:51 +02:00

Fix iwconfig re_interface regex

Small fix of re_interface in iwconfig.py.
When the network SSID contains a "-" character, the network interface was ignored.
This commit is contained in:
Louis Desplanche
2023-03-31 11:15:31 +02:00
committed by GitHub
parent 37a1428914
commit 5b06f84917

View File

@@ -146,7 +146,7 @@ def parse(
raw_output: List[Dict] = []
re_interface = re.compile(r'^(?P<name>[a-zA-Z0-9:._-]+)\s+(?P<protocol>([a-zA-Z0-9]+\s)*[a-zA-Z0-9.]+)\s+ESSID:\"(?P<essid>[a-zA-Z0-9:._\s]+)\"')
re_interface = re.compile(r'^(?P<name>[a-zA-Z0-9:._-]+)\s+(?P<protocol>([a-zA-Z0-9]+\s)*[a-zA-Z0-9.]+)\s+ESSID:\"(?P<essid>[a-zA-Z0-9:._\s\-]+)\"')
re_mode = re.compile(r'Mode:(?P<mode>\w+)')
re_frequency = re.compile(r'Frequency:(?P<frequency>[0-9.]+)\s(?P<frequency_unit>\w+)')
re_access_point = re.compile(r'Access Point:\s*(?P<access_point>[0-9A-F:]+)')