1

Hi guys I'm working on a network project as I'm a beginner i hope you can help me: I'd like to retrieve the channel my network is on using python like netsurveyor is giving a graph showing the channel our network is using I'd like to know how in python I can get the same infos. I've linked a screnshot of netsurveyor to show more ecxplicitly what I'm trying to do. netsurveyor example

Ait Zaid
  • 129
  • 12
  • try look at this for the wifi package to use: https://stackoverflow.com/questions/39679421/python-scan-for-wifi – Sasha Jan 16 '18 at 10:37
  • I have no experience with this package in particular, but it seems to be your best bet. – Sasha Jan 16 '18 at 10:37
  • netsurveyor is a 802.11 monitoring tool, you will need to use something that can sniff 802.11 packets, like impacket or scapy. there are several github projects that have a simple implementation of it, i haven't used it but here's one that is well documented you can start from: https://github.com/rahilsharma/Scapy-wireless-scanner/blob/master/wireless_scanner.py – AntiMatterDynamite Jan 16 '18 at 11:00

1 Answers1

0

Here is a way to retrieve the informations needed

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

this command line give you the information needed : the output is like this:

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

Ait Zaid
  • 129
  • 12