Forum Moderators: open

Message Too Old, No Replies

howto autologin Gmail after Google's change.

did it by html, doesn't work anymore. can JS help?

         

GeminiAlpha

9:46 am on Nov 8, 2009 (gmt 0)

10+ Year Member


A long time I did login Gmail by a(n unsafe) html script. As of last october Google changed their login form in a way that this relative simple html script doesn't work anymore.
html-script:
<form id="autoLoginbutton1"style="display: inline;" action="https://www.google.com/accounts/ServiceLoginAuth?service=mail" method="post">
<input type="hidden" name="ltmpl" value="default" />
<input type="hidden" name="ltmplcache" value="2" />
<input type="hidden" name="continue" value="https://mail.google.com/mail/ui=2#inbox" />
<input type="hidden" name="service" value="mail" />
<input type="hidden" name="rm" value="false" />
<input type="hidden" name="hl" value="NL" />
*insert line*
<input type="hidden" name="Email" value="account1@gmail.com" />
<input type="hidden" name="Passwd" value="password1" />
<input type="hidden" name="rmShown" value="1" />
<input type="hidden" name="signIn" value="Sign in" />
<input type="hidden" name="asts" value="" />
<input type="submit" value="Gmail button1txt" />
</form>

5 times this script in a html file gave me 5 buttons to autologin the account of my choice.
Google incorporated a changing variable GALX in their login form and I found out that using GALX with the right value in this html script, like:
<input type="hidden" name="GALX" value="6Nb9AfkKKbU" />
at *insert line* makes this html script working again.
Problem is that each fresh browser start causes a new GALX value in Google's login form.

Who can/will volunteer in adding relevant JS to handle GALX with its changing value?
My JS capabilities are practically zero, so I'm looking for help here. Your help is appreciated very much.

Rudolf

Fotiman

4:31 pm on Nov 9, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



That value looks like a session id, which will only be assigned when you establish a session with their web server. Perhaps you might be able to use AJAX to make a request to the login page behind the scenes, and then parse the results to get the GALX value?

GeminiAlpha

8:49 am on Nov 12, 2009 (gmt 0)

10+ Year Member



Sounds good! Next step is find someone with JS capabilities that creates and embed such a script within my html code.
Can somebody help, please?
Your help is appreciated very much.
Rudolf.

janharders

9:06 am on Nov 12, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure about security within local html-files, but generally, your javascript won't be allowed to access different domains, unless it's running in another context (as in firefox modules etc).

GeminiAlpha

7:58 pm on Nov 12, 2009 (gmt 0)

10+ Year Member



When the embedded line, as in my example:
<input type="hidden" name="GALX" value="6Nb9AfkKKbU" />
has the right GALX value, the html file works. I tested this by login Gmail by hand, collect GALX value by hand, edit it into the html script, then run it, that works.
Or is this not what you mean?
Of course an account must be logged off before logging into another one. Just some mouseclicks, 2 pages back, then push another button for another Gmail account login.

janharders

7:21 am on Nov 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I meant that you most likely cannot use a javascript that runs in the general security zone to collect the galx-value, because the script is not allowed to access another domain.
That might, however, just be a browser setting, and if it's just for you, you could turn it off. Then, it'd be pretty easy, I suppose, one ajax-request to get the galx-value and pre-filling the form-field.