Wi-Fi QR Code Generator Using Python Last Updated : 31 May, 2021 Comments Improve Suggest changes Like Article Like Report 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 connect other devices using Python. Before starting we need to install the wifi-qrcode-generator module to generate a QR code for your Wi-Fi to let others quickly connect your Wi-Fi: Installation: This module does not come built-in with Python. To install this type the below command in the terminal. pip install wifi-qrcode-generator Usage: Python3 # Import module import wifi_qrcode_generator as qr # Use wifi_qrcode() to create a QR image qr.wifi_qrcode('wifi name ', False, 'WPA', 'password') Output: Now let's Get the current Wi-Fi name and Passwords in cmd: If you write this netsh wlan show interface code into cmd terminal then you will get various details : If you write this netsh wlan show profile {Profile Name} key=clear code into your terminal then you will get network key. Approach: Import the module subprocess and wifi-qrcode-generator module.Get the output for the command netsh wlan show interface using subprocess.check_output().Decode the output with utf-8, split the metadata according to the line.Now get the split string to find your current Wi-Fi name (SSID name).Now do the same for password and find the Wi-Fi password (Key Content).Now Generate your Wi-Fi QR code. Below is the Implementation. Python3 # import modules import subprocess import wifi_qrcode_generator # try catch block begins # try block try: # traverse the profile Id = subprocess.check_output( ['netsh', 'wlan', 'show', 'interfaces']).decode('utf-8').split('\n') id_results = str([b.split(":")[1][1:-1] for b in Id if "Profile" in b])[2:-3] # traverse the password password = subprocess.check_output( ['netsh', 'wlan', 'show', 'profiles', id_results, 'key=clear']).decode('utf-8').split('\n') pass_results = str([b.split(":")[1][1:-1] for b in password if "Key Content" in b])[2:-2] print("User name :", id_results) print("Password :", pass_results) except: print("something wrong") # generate Qr code wifi_qrcode_generator.wifi_qrcode(id_results, False, 'WPA', pass_results) Output: Comment More infoAdvertise with us Next Article Wi-Fi QR Code Generator Using Python kumar_satyam Follow Improve Article Tags : Python python-utility Practice Tags : python Similar Reads Generate QR Code using qrcode in Python A Quick Response Code or a QR Code is a two-dimensional bar code used for its fast readability and comparatively large storage capacity. It consists of black squares arranged in a square grid on a white background.Python has a library "qrcode" for generating QR code images. It can be installed using 2 min read Python | Generate QR Code using pyqrcode module Let's see how to generate QR code in Python using pyqrcode module. pyqrcode module is a QR code generator. The module automates most of the building process for creating QR codes. This module attempts to follow the QR code standard as closely as possible. The terminology and the encodings used in py 2 min read 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 Create a Random Password Generator using Python In this article, we will see how to create a random password generator using Python. Passwords are a means by which a user proves that they are authorized to use a device. It is important that passwords must be long and complex. It should contain at least more than ten characters with a combination 5 min read Reading and Generating QR codes in Python using QRtools This article aims to introduce the use of the python library: qrtools. This library can be used to both read QR codes and generate them. What are QR codes? QR code, or quick response code, is a trademark for a type of 2 dimensional barcode. 2 dimensional barcodes are similar to one dimensional barco 5 min read How to find available WiFi networks using Python? 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 Py 2 min read Generating Strong Password using Python Having a weak password is not good for a system that demands high confidentiality and security of user credentials. It turns out that people find it difficult to make up a strong password that is strong enough to prevent unauthorized users from memorizing it. This article uses a mixture of numbers, 3 min read Generating Random id's using UUID in Python We had discussed the ways to generate unique id's in Python without using any python inbuilt library in Generating random Idâs in PythonIn this article we would be using inbuilt functions to generate them. A UUID is 128 bits in total, but uuid4() provides 122 bits of randomness due to version and va 3 min read Internet of Things with Python The integration of Python into the Internet of Things (IoT) signifies a transformation in how we develop, implement, and scale IoT applications. Python's simplicity, versatility, and robust library ecosystem make it an excellent choice for IoT development, enabling everything from simple home automa 8 min read How to generate a unique username using Python A username is a unique name that is mainly used on websites and apps. A username is used to identify a person. For example, if your name is Akshay and you want to create your account on any social media app, here we need a username such that another person can find us. It is not possible to search b 4 min read Like