Jump to content

Curl


Minase

Recommended Posts

hy all long time no see :)

recently i did find this problem

i'm trying to login to a webpage with curl ,but without success ,ofcourse the basic posting is not the problem xD but the page have a hidden field (for security) so everytime you load the page it changes so post wont work if you first use get to take the page and extract the hash from it.

 

the page contains something like

input type= hidden value=A RANDOM VALUE THAT CHANGES EVERYTIME

 

without that value passed to post it wont login.

 

anyone knows how can i pass it so the post will be valid?

thank you

Link to comment
Share on other sites

In short, this is why they have this value so you can't do what you're trying to do  :o

 

Most likely they are sending a cookie on the first request and storing the hidden value in a session tied to that cookie on the remote server.  Then when you post the server is requesting the cookie to identify the session and looking up the value and comparing it with what is submitted on the form.

 

You may be able to accept and present cookies with curl to get it to work but I have never used cookies with curl.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.