User1585979964 posted
Hello! Need to authorize in an ASP.NET website with curl. It has /Login.aspx webpage, it does recursive redirects and sets up cookies.
After setting up cookies Login.aspx shows login form - login, passwd there and also hidden inputs
__VIEWSTATE, __EVENTVALIDATION that have base64 values.
I do insert input names and values into curl requies and send cookies file.
But page gives me error here:
$ curl -L --cookie-jar cj5 --cookie cj4 -X POST 'https://url.to/Login.aspx' \
-d "__VIEWSTATE=/HASHbigHASHthere=" \
-d "__EVENTVALIDATION=/theSAMEthingsHEREhashMYhash==" \
-d "login=znavko" \
-d "passwdline=pips11"
<!DOCTYPE html PUBLIC...>
...
...
System.ArgumentException: Invalid postback or callback argument.
Event validation is enabled using <pages enableEventValidation="true"/> in configuration
or <%@ Page EnableEventValidation="true" %> in a page.
For security purposes, this feature verifies that arguments to
postback or callback events originate from the server control
that originally rendered them. If the data is valid and
expected, use the ClientScriptManager.RegisterForEventValidation
method in order to register the postback or callback data for validation.
...
Can you advise how to use EventValidation in curl? Also is it rigt to write base64 as it is or how to escape / and =