In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what is the encryption logic of Python query parameters". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "what is the encryption logic of Python query parameters"!
Encryption Logic Analysis of query parameters of a query Cat
Link first:
AHR0cHM6Ly93d3cucWljaGFtYW8uY29tLw==
Bag grab analysis
Find the parameters to be analyzed, through the search bar on the front page, enter the enterprise name keyword and click on the query to catch two packages similar to the following.
The mfccode marked above is the encryption parameter that needs to be analyzed.
Similarly, I noticed that the last request selected in the above figure looks like an encrypted request, and then uses breakpoints to analyze whether it is an encrypted location.
Encrypted location
Type the XHR breakpoint on this request
After re-initiating the request, you can see the successful disconnection.
Find the location in the following figure by analyzing the stack and find the location of the encryption.
The place where the encryption is generated can be found through the breakpoint.
Or find the following location in the stack, or you can quickly locate the encrypted location.
Encryption analysis
After finding the location of encryption, the next step is to analyze the logic of encryption. If you hit the breakpoint, you can see that you have entered a VM here.
We copy it to the beautification website and analyze it after formatting.
You can roughly see this code manipulating the qznewsite.uid field in cookie in the editor.
Finally, the result of the dc method is returned to window.__qzmcf, which corresponds to the result of my breakpoint on the web page
As long as you can run through this js, you can complete this encryption.
After modification, it can run normally, and the main solution is the problem of calling window and document in node.
But bringing the results into the Python code did not return the search results as expected, but returned to the login interface, which puzzled me.
At first, I thought it was my crawler code, and then it occurred to me that the js code was returned to the client by the other side, so the js code should be dynamic.
By comparison, it is found that the long arrays of mov and sk are dynamic, and there may be other code that is dynamic, but this indirectly confirms my guess.
So there is no way to crack the js encrypted code by writing a dead call. To figure this out, I just need to call the returned js code dynamically.
The first step is to pass in the cookie and replace it with the cookie returned from the first visit to the home page, but there seems to be no verification in this step after the test, so it is OK to write it to death.
The second step is to fix the dynamic call returned by the server on the basis of static code, such as declaring window,document, which has been mentioned in previous articles.
The third step is to call the window.__qzmcf method to complete the generation of encryption parameters
After completing the above steps, call again to get the results of the web page correctly.
At this point, I believe you have a deeper understanding of "what is the encryption logic of Python query parameters". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.