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

SD-WAN (Part 2)

The previous article "Things about SD-WAN (P...

How these three benefits of SDN can help small businesses

Large and medium-sized enterprises adopt SDN as a...

5G and Wi-Fi 6, the next generation of infrastructure?

Cellular and Wi-Fi networks have come together to...

ATCLOUD: $3/month KVM-1GB/20GB/1TB/USA, UK, Singapore, Germany, France, etc.

ATCLOUD is a foreign hosting company founded in 2...

5G speed may be slower than 4G?

In 2020, as the first year of 5G, 5G network cons...

Is the WiFi slow and lag the router? The phone is to blame

Under the guidance of the idea of ​​increasing mo...

A brief discussion on the 3PC protocol for distributed system consistency

This article is reproduced from the WeChat public...

2018 World Internet of Things Expo press conference held in Beijing

Today, the global Internet of Things era is leadi...

Are 5G base stations harmful to the human body?

By the end of 2020, my country has built a total ...

5G competition is not just about speed, security mechanisms need to be clarified

Currently, 5G standardization has been fully laun...

A "right remedy" for Ethernet Mac and Phy layer problems

In today's digitally connected world, Etherne...

Insurance Geek: Lay a solid foundation and take group insurance to the extreme

[51CTO.com original article] As a worker, have &q...