Python Black Technology: WiFi Cracking, Has Your WiFi Been Hacked Again?

Python Black Technology: WiFi Cracking, Has Your WiFi Been Hacked Again?

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.

[[224326]]

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"

Recommend

In the new era, how can operators seize the opportunity of industrial Internet?

2020 is the year when 5G enters large-scale appli...

PTC acquires next-generation application lifecycle management company

PTC​​ (NASDAQ: ​​PTC ​​) ​​today announced that i...

5G is here! How long will it take for it to be truly universally adopted?

4G, the mobile network that allows us to make cal...

LoRaWAN will temporarily replace 5G networks for IoT

5G networks are set to revolutionize the Internet...

Easy to understand, this article will introduce you to the HTTP protocol?

1. What is http? Http protocol is Hypertext trans...

Shengye: Equipping "engineering projects" with a digital brain

The construction industry is an important pillar ...

Eight excellent open source intranet penetration tools

Intranet penetration (NAT penetration) is a techn...