Today I bring you a fun thing to crack WiFi passwords. Sometimes I forget the WiFi password in my own dormitory, what should I do if others want to use it? As before, I'll put a link to the source code in the comments section. Python Black Technology: WiFi Cracking, Has Your WiFi Been Hacked Again? Although it can be reset, don’t we have Python? Yesterday I told you how to crack encrypted files with Python. Today I will introduce you how to crack WiFi passwords with Python. In fact, our core things have not changed. The main purpose is to let you know how to use Python’s related modules.
First, the first step: We need to know what to use, a module in Python, pywifi, just install it with pip install pywifi. I saw someone say it can't be used, but I tried it and there is no problem at all. If any of you encounter any problems, you can leave a message in the comment area or chat with me privately. I am very happy to help you solve the problem. Step 2: We need to know whether we are connected to WiFi or not. How can we check it? This is the time to disconnect I just learned it today, so I tried it. ifaces.status() returns a connection status. If it is not connected, it returns 0, and if it is connected, it returns 4. The const.IFACE_CONNECTED at the end is a constant in this module, which is used to judge the connection status, that is, 4. Step 3: We need to find a way to connect to our WiFi, so how do we do it? Just add a little code in front of the if statement in the code we just wrote. These are the processes of connecting to WiFi. It seems very troublesome, but if you look at its source code, you will find it very simple (it’s just that the underlying parts are difficult to understand, but we don’t need to involve the underlying parts either) Connect to WiFi successfully Step 4: It seems like I was exposed just now. I just asked my roommate, is it also for demonstration effect? Don't worry about it~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I originally used 5 seconds, but I found that 1 second was enough. Okay, now we have designed a brute force cracking method (only simple ones can be cracked. If the password is complex, a password table, such as a rainbow table, is required) Finished Code This code is completed, but the efficiency is not good. The main reason is not that the password is too strong, but that we always have to sleep for one second. Today's explanation ends here. Tomorrow I will continue to fix the efficiency problem (in fact, it is very simple as long as you use threads to judge, you can try it yourself), and make it into a usable finished product tomorrow. |
<<: The world's first batch of 5G-enabled Wi-Fi hotspots are here
>>: Huawei Cloud Ecosystem is "Very Different" in 2018, Focusing on "Quantity" and "Quality"
BandwagonHost recently added VPS products for Chi...
[[417941]] This article is reprinted from the WeC...
When IT departments consider work-from-home strat...
Have you ever found yourself always experiencing ...
TCP is a connection-oriented reliable transmissio...
The 5G era is just around the corner, and it prom...
This year's government work report proposed t...
The Internet plays a key role in our daily lives,...
The Wireless Broadband Alliance (WBA) has announc...
On December 22, according to foreign media report...
China Telecom and China Unicom jointly announced ...
The popularity of 5G networks, 5G mobile phones, ...
[51CTO.com original article] The Global Software ...
According to foreign media reports, the "Mob...
In the tide of information and communication tech...