In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
In this article, the editor introduces in detail "how to achieve the login interface in python". The content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to achieve the login interface in python" can help you solve your doubts.
The first one: direct request
Click login to send a request. The parameters are shown in the figure above.
For the actual submitted parameters, see the figure below. Basically, all the circled parameters in the figure can be found, which are in the requested HTML.
The fp parameter and the eid parameter are actually fixed. So you can just write death. When I saw a pubKey, I thought I could basically guess that it was a RSA encryption, and what was encrypted was the password.
Then there is a seqSid parameter and an authcode parameter
The seqSid parameter is the response returned by an interface, and the global search _ jdtdmap_sessionId will find this interface.
The parameter authcode is the parameter generated after sliding, and it is also the most disgusting parameter.
Source of authcode parameter:
Request URL:
Parameters:
Response: validate is authcode
Of the request parameters, only the d parameter is actually the most important, and the others are relatively simple.
C: is the challenge parameter returned when getting the CAPTCHA image. Slide/g.html
Bg and patch are background images and gap shapes, respectively.
The code that identifies this distance is copied from the Internet and forgets where it came from.
Def test_demo_cv2 (self): "" get the gap location: return: "" block = cv2.imread ("bg.jpg", 0) template = cv2.imread ("patch.jpg", 0) w H = template.shape [::-1] # binary picture name blockName = "block.jpg" templateName = "template.jpg" # Save the binarized picture cv2.imwrite (blockName, block) cv2.imwrite (templateName, template) block = cv2.imread (blockName) block = cv2.cvtColor (block Cv2.COLOR_RGB2GRAY) block = abs (255-block) cv2.imwrite (blockName, block) block = cv2.imread (blockName) template = cv2.imread (templateName) # get offset result = cv2.matchTemplate (block, template, cv2.TM_CCOEFF_NORMED) # find the location of block in template Return result is a matrix Is the matching result of each point x, y = np.unravel_index (result.argmax (), result.shape) cv2.rectangle (block, (y, x), (y + w, x + h), (7,249,151), 2) cv2.imshow ('block', block) cv2.waitKey (0) print ("offset in x direction", int (y * 0.4 + 18) 'YRU return, y)
But sometimes it's not accurate.
W: width of CAPTCHA, fixed 280
AppID: fixed valu
Product: fixed valu
Scene: fixed valu
E: fixed value
S: global search _ jdtdmap_sessionId
Are all the median values on the page.
Finally, let's talk about the location of d and d: in slide.js, there is a version number in the middle of the name, not written.
The value of g
This is the track list, which is encrypted to generate the d parameter.
Features of the track list:
In the first group, coordinate x is fixed.
The last set of x-the first set of x = sliding distance
The value of y changes little.
There are many ways to generate trajectories, but it seems that what Baidu can reach is useless.
After generating the track list, pass the parameter to the encrypted function and return the encrypted parameter d
Encrypted function location:
After reading this, the article "how to achieve the login interface for python" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, 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.
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.