Curl script just fills out the form without submitting it

I have this little problem. I wrote a curl script to click the link first and then fill out the form the link provides.

Parcel Request link at http://www.fikeandfike.com/propertytax/Grundy/MainMenu.aspx?c=32

and the form is at http://www.fikeandfike.com/propertytax/Grundy/Inquiry.aspx

but my problem is that the script fills out the form and do nothing with it

when I return the result of curl it shows the completed form, but I want to see the result of the form

Could you tell me why this is happening? can you suggest some trick to overcome this problem?

+1
source share
1 answer

As mentioned in the comments, the problem is that the site you are trying to β€œclean up” is created using ASP.net, which does not use form data in the usual way.

I know someone who works successfully, but this is inconvenient. The key hidden fields for observation are:

  • __EVENTTARGET and __EVENTARGUMENT : they are set by Javascript when you submit the form, but always to the same value. If you use a browser debugging tool (Firebug, URLParams, etc.), to check the result of a real POST, you will not be able to fill them without problems.
  • __VIEWSTATE : it is created every time the page is loaded, so you need to clear it from the HTML of the loaded form every time you request it.
  • __EVENTVALIDATION : This field exists specifically to prevent a substitution attempt. Like __VIEWSTATE , it is restored every time the page loads, but its presence may mean that you can only change one field at a time , as it will check that you are sending to the previous state.

I may be mistaken in some features, but this should give you the opportunity to start ...

0
source

Source: https://habr.com/ru/post/1274277/


All Articles