liber77 Posted December 11, 2011 Share Posted December 11, 2011 I know that it is possible to see what is sent by looking at livehttpheaders, but how do you know how hidden variables are generated? I don't think that that's possible to see that from live httpheaders. Quote Link to comment https://forums.phpfreaks.com/topic/252927-how-to-know-when-websites-generate-hidden-variables/ Share on other sites More sharing options...
xyph Posted December 11, 2011 Share Posted December 11, 2011 The HTTP headers contain any specific information about yourself besides your IP. This includes user-agent, cookies and post data. I'm not sure it's possible to have 'hidden' variables. Quote Link to comment https://forums.phpfreaks.com/topic/252927-how-to-know-when-websites-generate-hidden-variables/#findComment-1296715 Share on other sites More sharing options...
liber77 Posted December 11, 2011 Author Share Posted December 11, 2011 I meant, sometimes you don't know how the variables being sent are generated, because they're not entered manually. How do you know how these variables were given their value? Quote Link to comment https://forums.phpfreaks.com/topic/252927-how-to-know-when-websites-generate-hidden-variables/#findComment-1296716 Share on other sites More sharing options...
trq Posted December 11, 2011 Share Posted December 11, 2011 Your still not making allot of sense. What "hidden" variables are you talking about? Variables are part of server side code. There is no way to see what variables have been set without looking at that code. Quote Link to comment https://forums.phpfreaks.com/topic/252927-how-to-know-when-websites-generate-hidden-variables/#findComment-1296719 Share on other sites More sharing options...
liber77 Posted December 11, 2011 Author Share Posted December 11, 2011 when I post to forms through php curl, there are some variables being sent that are not entered by the user when using a web browser. I am able to see which variables are being sent using livehttpheaders. Some variables are changing values dynamically, and it is not always possible to find the value of the hidden variables in the source code of the webpage. I want to find those values, so that I can post to specific websites. I am usually able to find the hidden variables in the source code, but sometimes that's not possible. hidden variables can look like e.g. sid=qt44ry2wr5y45ywhy55he5ty. You can find the previous value in livehttpheaders, but the value might change dynamically, so that next time you visit the page the variable is different. Quote Link to comment https://forums.phpfreaks.com/topic/252927-how-to-know-when-websites-generate-hidden-variables/#findComment-1296724 Share on other sites More sharing options...
dweeber Posted December 11, 2011 Share Posted December 11, 2011 The SID is the Session ID. You are most likely using session variables. See: http://php.net/manual/en/function.session-start.php Quote Link to comment https://forums.phpfreaks.com/topic/252927-how-to-know-when-websites-generate-hidden-variables/#findComment-1296726 Share on other sites More sharing options...
xyph Posted December 11, 2011 Share Posted December 11, 2011 Hidden input elements, probably. Quote Link to comment https://forums.phpfreaks.com/topic/252927-how-to-know-when-websites-generate-hidden-variables/#findComment-1296811 Share on other sites More sharing options...
OOP Posted December 11, 2011 Share Posted December 11, 2011 Now after you mentioned the "sid", maybe you are talking about cookies values, if any, which are sent by the browser to the server whenever you send a new HTTP request Quote Link to comment https://forums.phpfreaks.com/topic/252927-how-to-know-when-websites-generate-hidden-variables/#findComment-1296830 Share on other sites More sharing options...
xyph Posted December 11, 2011 Share Posted December 11, 2011 This was probably implemented to prevent bots from submitting forms. What you're doing probably violates their TOS. Quote Link to comment https://forums.phpfreaks.com/topic/252927-how-to-know-when-websites-generate-hidden-variables/#findComment-1296860 Share on other sites More sharing options...
liber77 Posted December 12, 2011 Author Share Posted December 12, 2011 Hey, I have figured out the answer if anyone is interested. It is not always possible to find the variables by fetching them from the website source. Sometimes they are generated on the server side, or it might be done on the client side in a complicated way to make it difficult to reproduce. Sometimes complicated forms are encoded and sent through the headers. One answer is to use selenium firefox plugin and reverse engineer the actions done by the browser. You can record the actions and then export as php, java, C/C++ or whatever. This doesn't actually have any limitations, and it can automate any action done by a web browser. PHP curl does have it's limitations, and the variables sent through the headers might change every time, so they can't be used for future automation. Quote Link to comment https://forums.phpfreaks.com/topic/252927-how-to-know-when-websites-generate-hidden-variables/#findComment-1297320 Share on other sites More sharing options...
xyph Posted December 13, 2011 Share Posted December 13, 2011 You have to know which data will be variable, figure out how the data is calculated, and if it's random, use two cURL commands. Use the first one to grab any data that may be variable, and the second to send the variable data along with the data yoiu may want to post. That's all the help I can give, considering it's probably there to circumvent automated posting. cURL can be used to emulate most browser functionality, it just requires you to do all the background work your browser usually does for you. Quote Link to comment https://forums.phpfreaks.com/topic/252927-how-to-know-when-websites-generate-hidden-variables/#findComment-1297329 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.