In the recent development of the company's project, I received some new knowledge about Python and Wi-Fi. Now I want to share with you what I found out. Please note: regardless of whether you are working on Python or are fond of coding, remember: the experience of developing example projects is always the basis, so I propose to get acquainted with the project below.
During the development of this tool, I found several projects on the Internet, but they all work under Linux and cannot be directly used for the Windows platform, so I decided to modify them so that they work under Windows in combination with projects found for Linux.
First, I advise you to read the article “Very easy to understand the Python script for hacking the password wifi But the article uses the PyWIFI module,“ This module is a little weak for Win and the author does not use the function “ Safety "WLAN when calling WLAN API, so it is recommended to run the code for Linux. Kali 2.0 with Python 2.7.6, which can be installed directly through PIP Install Pywifi.
When using a test example provided by the module, it is found that Print displays a lot of useless information, so the call to “show my necessary information” is removed from line 335 “WiFi Util Win. Py ".
1. We get information about the device
2. Screw up wi-fi access points
3. Let's try to connect to the Wi-Fi access point.
4. We will derive scan results
The scan results are obtained mainly using the SCAN function. In the code below Sleep (2) is due to the fact that a local wireless network card requires some time to return information during the test. Of course, if your network card has good performance, you can remove this Sleep:
Let's try to connect (hack password)
To hack the password, first we determine the device signal, and then call Connect as a parameter to try to connect to Wi-Fi. We use the Status function to get the parameters of the connection result. If we get Const.iFace_Connected, the connection is established successfully, and the result is displayed. If the answer is different, then the password is selected.
#python #Programming #Technology #coding #bigdata #computerscience #Tech #Data #PythonProgramming