About using curl to simulate login, the CAPTCHA is invalid? Repeatedly refreshed the web page? The cookie read is wrong?

when I simulate logging in to the educational administration system, I first request the verification code through curl_init connection, and obtain the verification code value
I carry the cookie + post data + verification code obtained when obtaining the verification code value, which shows that the verification code is invalid

I find that the problem of CAPTCHA invalidation occurs when the original web page accesses the form submission address without parameters and when it is submitted repeatedly

successful login request information is as follows

clipboard.png

:


cookie


~~

encoded

cookie

cookie

:


:

clipboard.png

header

clipboard.png

Php
Jun.09,2021

problem with update: login cookie was not saved

=

data of encoded field is missing

The key point of

simulated login is simulated . Don't ignore any details and submit as many fields as the form has.


timing problem. You have to simulate the normal login process. First, visit the login page by get, get the cookie, then get the CAPTCHA, and finally submit

.
Menu