Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Case study of Python MD5 Hash

Shulou Source: shulou.com Published: 2022-06-01 11:49:20 09月20日 Update

This article mainly introduces "Python MD5 Hash Case Analysis". In daily operation, I believe many people have doubts about Python MD5 Hash Case Analysis. Xiaobian consulted various materials and sorted out simple and easy operation methods. I hope to help you answer the doubts of "Python MD5 Hash Case Analysis"! Next, please follow the small series to learn together!

Target station

aHR0cHM6Ly9tLndjYmNoaW5hLmNvbS9sb2dpbi9vdGhlci1sb2dpbi5odG1s

analysis request

The old rule is to capture the packet analysis request first [Figure 1-1]:

Figure 1-1

You can see that the submitted parameters are data in json format, with sign and password, two obvious encryption, first search one by one.

Location encryption- sign

The encrypted location can be located directly by searching the parameter name. Figure 2-1

Figure 2-1

Open the second search result in Figure 2-1, and you can see the obvious encryption position. Figure 2-2

Figure 2-2

The re-request can be broken directly at the location of our breakpoint, the variable v and the variable g are both undefined, and the variable N is the result of the variable c hashed in upper case. Figure 2-3

figs. 2-3

We can verify this with Python code.

from hashlib import md5def md5value(s): a = md5(s.encode()).hexdigest() return aprint(md5value ('1570346144866 ').upper())==================

According to the above idea, we search for the parameter name password , and the search results are more [Figure 3-1].

Figure 3-1

One by one to find too much trouble, the simpler way is to use XHR breakpoint directly and then directly flip the stack.

First add an XHR breakpoint according to the XHR request [Figure 3-2]

Figure 3-2

After re-requesting, scroll up gradually in the stack bar on the right [Figure 3-3], and observe the change of password value on the left. You can see that when the breakpoint is at [Figure 3-3], the password value is the plaintext we entered, and the next value is encrypted.

Figure 3-3

At the same time, you can locate the encryption position of password in [Figure 3-4]

figs. 3-4

The encryption logic is also very simple.

from hashlib import md5def md5value(s): a = md5(s.encode()).hexdigest() return aprint(md5value ('11111111 ').upper())==================

Here, the overall encryption is analyzed, which is very simple.

At this point, the study of "Case Analysis of Python MD5 Hash" is over, hoping to solve everyone's doubts. Theory and practice can better match to help everyone learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!

Tags: Encryption analysis location results search cases case studies variables breakpoints learning positioning parameters obvious at the same time stack methods more help practical next Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Microsoft Redmi MariaDB Shulou Technology