How to find available WiFi networks using Python? Last Updated : 10 Mar, 2022 Comments Improve Suggest changes Like Article Like Report WiFi (Wireless Fidelity) is a wireless technology that allows devices such as computers (laptops and desktops), mobile devices (smartphones and wearables), and other equipment (printers and video cameras) to interface with the Internet. We can find out the names of the WiFi names with the help of Python. We need to have the basics of networking to help us know what we need and what we do not need. Module requiredsubprocess: The subprocess module allows you to spawn new processes, connect to their input/output/error pipes, and obtain their return codes. We do not need to use pip to install it as the subprocess module comes preinstalled. With the subprocess module, we need to use the check_output() method. We will pass a list of the things we will need to know about the WiFi networks. We will need netsh, wlan, show and network. These parameters are passed for storing the outputs in them and then converting it to strings to display the outputs. Syntax: subprocess.check_output(args, *, stdin=None, stderr=None, shell=False, universal_newlines=False) Parameters: args: The arguments used to launch the process. This may be a list or a string.stdin: Value of standard input stream to be passed as pipe(os.pipe()).stdout: Value of output obtained from standard output stream.stderr: also known as standard error, is the default file descriptor where a process can write error messages. Basically the value of the error(if any)shell: It is a boolean parameter.If True the commands get executed through a new shell environment.universal_newlines: It is a boolean parameter .If true files containing stdout and stderr are opened in universal newline mode. Returns: Information about the networks Now here is the code for it Python3 # importing the subprocess module import subprocess # using the check_output() for having the network term retrieval devices = subprocess.check_output(['netsh','wlan','show','network']) # decode it to strings devices = devices.decode('ascii') devices= devices.replace("\r","") # displaying the information print(devices) Output: Comment More infoAdvertise with us Next Article How to find available WiFi networks using Python? A abhisheksrivastaviot18 Follow Improve Article Tags : Python python-utility Practice Tags : python Similar Reads How to connect WiFi using Python? Seeing a computer without an active internet connection today is next to impossible. The Internet has been of the utmost importance in the 21st Century. There are multiple ways one can connect their machine to the Internet. The first being, the traditional cables, i.e. the Ethernet, and the other be 5 min read Finding All Wifi-Devices using Scapy Python Scapy is a library supported by both Python2 and Python3. It is used for interacting with the packets on the network. It has several functionalities through which we can easily forge and manipulate the packet. Through scapy module, we can create different network tools like ARP Spoofer, Network Scan 3 min read Wi-Fi QR Code Generator Using Python Prerequisite: Getting Saved Wifi Passwords using Python We know the wireless network is the most common network adapter for today, Because of its supports portability and User friendly. In this article, we will see how we can get the current saved Wi-Fi name and passwords and generate QR code to con 2 min read How to Build a WiFi Scanner in Python using Scapy? In this article, we are going to build a WiFi Scanner in Python using Scapy. WiFi Scanning or Network scanning refers to the scanning of the whole network to which we are connected and try to find out what are all the clients connected to our network. We can identify each client using their IP and M 3 min read How to Disconnect Devices from Wi-Fi using Scapy in Python? Without permission, disconnecting a device from a Wi-Fi network is against the law and immoral. Sometimes, you might need to check your network's security or address network problems. You may send a de-authentication packet to disconnect devices from Wi-Fi using Scapy, a potent Python packet manipul 5 min read View Computer's Important Network Information Using Python While working in a network, we do some troubleshooting with the network or Internet problem. This time we need to check your own system network connection information. We can find the network connection in the Control Panel in Windows. The best way to find this information we can use ipconfig comman 1 min read Build a GUI Application to ping the host using Python Prerequisite: Python GUI â Tkinter In this article, we are going to see how to ping the host with a URL or IP using the python ping module in Python. This module provides a simple way to ping in python. And It checks the host is available or not and measures how long the response takes. âBeforeâ sta 2 min read Create a GUI to find the IP for Domain names using Python Prerequisite: Python GUI â tkinterIn this article, we are going to see how to find IP from Domain Names and bind it with GUI Application using Python. We will use iplookup module for looking up IP from Domain Names. It is a small module which accepts a single domain as a string, or multiple domains 2 min read Network Scanner in Python A network scanner is one major tool for analyzing the hosts that are available on the network. A network scanner is an IP scanner that is used for scanning the networks that are connected to several computers. To get the list of the available hosts on a network, there are two basic methods - ICMP Ec 3 min read Network Scanning using scapy module - Python Scapy is a library supported by both Python2 and Python3. It is used for interacting with the packets on the network. It has several functionalities through which we can easily forge and manipulate the packet. Through scapy module we can create different network tools like ARP Spoofer, Network Scann 3 min read Like