网络频道 Python

Network channel Python

大家好我正在做一个网络项目,因为我是一个初学者,希望你能帮助我: 我想检索我的网络正在使用 python 的频道,就像 netsurveyor 提供的图表显示我们的网络正在使用的频道我想知道如何在 python 中获得相同的信息.我已经链接了 netsurveyor 的截图,以更明确地显示我正在尝试做的事情。 netsurveyor example

这是一种检索所需信息的方法

import subprocess
    available = subprocess.check_output('netsh wlan show network mode=bssid',stderr=subprocess.STDOUT,universal_newlines=True,shell=True)

此命令行为您提供所需的信息:输出如下:

SSID 1 : Rezalitchderk Network type : Infrastructure Authentication : WPA2-Personal Encryption : CCMP BSSID 1 : 62:f1:89:7c:71:d1 Signal : 91%
Radio type : 802.11n Channel : 11 Basic rates (Mbps) : 1 2 5.5 11 Other rates (Mbps) : 6 9 12 18 24 36 48 54

SSID 2 : HUAWEI Mate 10 lite Network type : Infrastructure Authentication : WPA2-Personal Encryption : CCMP BSSID 1 : 1c:15:1f:3f:87:f9 Signal : 82%
Radio type : 802.11n Channel : 11 Basic rates (Mbps) : 1 2 5.5 11 Other rates (Mbps) : 6 9 12 18 24 36 48 54