Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to simulate login using Python code

2025-06-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

In this article Xiaobian introduces in detail "how to use Python code to simulate login", the content is detailed, the steps are clear, and the details are handled properly. I hope this "how to use Python code to simulate login" article can help you solve your doubts.

Grab the bag

It is an international practice to grab the bag with fiddler first.

Analyzing the request parameters, you can see that the mobile phone number and password are encrypted.

Request

Response to app decompilation

Open the apk file directly using jadx

Parameter search

Click the magnifying glass icon above the menu bar, and then ✔ the code option to search the encrypted source code according to the request parameters of the grab package.

Search interface

Sometimes a parameter searches for a lot of results.

We can search for other parameters, or add double quotation marks to the parameters, which can reduce the interference.

Here is the encrypted source code I searched.

Encrypted source code

Encryption source code cracking

According to the encryption mode of the parameters in the source code, use python code to generate.

You can see that it is RSA/ECB/PKCS1Padding encryption, and the key uses base64 encryption.

Then the result of RSA encryption is encrypted with base64.

Pycryptodome module can be used in python to implement AES encryption.

It doesn't matter if you don't understand some source code, try more, check the usage of java, and ask more!

Verify login authentication

Above is the response result of using Python code to simulate the login result and fiddler grab package.

We can see from the comparison of the two results:

The code is 0, and the result of the logged in token_onlie is consistent.

It means that the login is successful and the encryption parameters are cracked!

Read here, this article "how to use Python code to simulate login" article has been introduced, want to master the knowledge of this article also need to practice and use to understand, if you want to know more about the article, welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report