Can't create Google/Yahoo accounts via httpwebrequest...

MarketerX

Regular Member
Joined
Mar 7, 2010
Messages
404
Reaction score
125
The POST request's on both these sites to successfully register a new account seem to be sending security token variables that are not accessible in the pages source, but seem to be generated by javascript.

Is the only solution to use the webbrowser control?? Too slow for what I want to do :(
 
You should first download the source of the page.

I just took a look, and saw all the fields.
 
You should first download the source of the page.

I just took a look, and saw all the fields.

For google accounts, the "KTL" variable is only generated if the user is using a webbrowser that supports JS

For yahoo accounts, the "pfmo" variable contains a random hash "bag=" that isn't in the page source. Also a few other JS related variables are needed in the post request.

If you can tell me how to get either of those variables it will help...but yahoo ctually has another 1 that isn't in the page source...
 
Last edited:
For google accounts, the "KTL" variable is only generated if the user is using a webbrowser that supports JS

For yahoo accounts, the "pfmo" variable contains a random hash "bag=" that isn't in the page source. Also a few other JS related variables are needed in the post request.

If you can tell me how to get either of those variables it will help...but yahoo ctually has another 1 that isn't in the page source...

You can use HttpWebRequest/HttpWebResponse to get the html and a WebBrowser control to execute the java script.
1)Get the html
2)Navigate to "about:blank", write the html in the WebBrowser control
3)Execute the javascript function
4)Post the data using HttpWebRequest/HttpWebResponse

I think that there are some JavaScript Evaluator libraries, but i wasn't able to find anything reliable.
 
Have you put this solution in practice? Did you make it work?
When you GET the html you also get the specific cookie then you use that same cookie when you post so if you want to load the html in the Web Browser Component before the POST to get the javascript parameters you also have to provide the specific cookies ... I know how to keep cookies separate with http web requests /web client but how do I control cookies with the WebBrowser Component? (I don't want my software to let google store any cookie in the default Internet Explorer cookies location, I don't want cookies for different accounts to be mixed at any point )
Any ideas? Anyone managed to get the javascript parameters using this mixed solution (or any other solution)??
 
Last edited:
Back
Top