Jump to content

Extracting form input parameters from form post


elitegosu

Recommended Posts

Hello,

 

I've been trying to figure out how to get all form input parameters from the form submit using curl post for the past couple of hours without any luck.

 

For example, here is what firebug is showing when I submit an empty form on one of the web sites:

 

Parameters:

birthDay 0

birthMonth 0

birthYear 0

city

country US

email

firstName

gender F

lastName

locale en_US

password

recaptcha_challenge_field 03AHJ_Vut1SDTkz_unIKB8DJKlN3ZkSUZvK5GE-tFtLHYRyW2APR_Q2N8NkXeAO8igQneIFHUlJ-fpeXcoH4GaHwA9-23khASLBCvOfzNnRkcBf-tct8nQDNyN-1JufeoN8FRcw9nQgImF3NaK5RHIAtCgnD_rkkaNbw

recaptcha_response_field

zipCode

 

And here is a string from livehttpheaders:

firstName=&lastName=&gender=F&birthMonth=0&birthDay=0&birthYear=0&country=US&city=&zipCode=&locale=en_US&email=&password=&recaptcha_challenge_field=03AHJ_VuvWuSCo4NdBfCmXcB4_JgoE2BhmDbK34b4YzlmtkGvEOuWy19yFLmuae5v-0YrW1Qb8BCGbRSI3iinD9odIm095VmZ2a4wEkFoFT2nt3Eo75_k_waqxjyePPl4Segl9F07-48H2TDZ2_4c3L6mGfKpxJfjOfg&recaptcha_response_field=

 

Both applications show that its possible to extract all necessary form input fields when the form is submitted, however I can't figure out how to do this in php.

 

I've been trying to use CURLOPT_POST, 1 and I tried submitting empty string using CURLOPT_POSTFIELDS and also tried turning CURLOPT_POSTFIELDS off, but I still can't extract the default post fields.

 

What I don't want is to use regex to match every form on a site (and all the input fields), it would make my life so much easier if I could just parse form action url and then extract all the necessary parameters from it.

 

I will greatly appreciate any help on this.

Link to comment
Share on other sites

Both applications show that its possible to extract all necessary form input fields when the form is submitted, however I can't figure out how to do this in php.

 

You can't retrieve those values if you didn't submit the form yourself. And cURL can't submit a form, it can however provide the POST data generated by a form to the processing script.

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.