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

From 5G to 6G: The race between innovation and disruption

McKinsey's 2022 Technology Trends Outlook sho...

How to choose NB-IoT, Cat.1, and Cat.M for IoT device communication?

1. What is NB-IoT NB-IoT (Narrow Band Internet of...

XDP technology for high-performance network framework

1. Basic Concepts of XDP XDP stands for eXpress D...

...

Related steps of network construction and problem solving

The basic process of network construction include...

It is urgent for operators to improve network operation and maintenance

Communication networks are the underlying infrast...

IPv6 series - 10 common problems for beginners

Based on the problems encountered by myself and m...

Ten major challenges facing 5G network technology

[[312884]] On January 9, 2020, China released the...