Python Forum
Network Scanning Libraries
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Network Scanning Libraries
#5
Well, subprocess with netsh should do what you want. See this: http://www.toptip.ca/2011/03/find-out-wh...-your.html
So, subprocess...

import subprocess

command = "netsh wlan show networks mode=bssid".split()
output = subprocess.check_output(command).decode('ascii') # or you can pass the command hardcoded: ['netsh', 'wlan0', 'show', 'networks', 'mode=bssid']
for line in output.split('\n'):
    if 'SSID' in line:
        print(line, end="")
    elif 'Channel' in line:
        print(line, '\n')
For example... Since I do not use Windows at all, I can't try it.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Messages In This Thread
Network Scanning Libraries - by johnmaras - Nov-04-2017, 12:08 PM
RE: Network Scanning Libraries - by Larz60+ - Nov-04-2017, 12:17 PM
RE: Network Scanning Libraries - by wavic - Nov-04-2017, 12:37 PM
RE: Network Scanning Libraries - by johnmaras - Nov-04-2017, 12:49 PM
RE: Network Scanning Libraries - by wavic - Nov-04-2017, 01:56 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  SyntaxError: EOF while scanning triple-quoted string literal Caroline 5 8,584 Feb-07-2018, 07:47 AM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020