GMAIL(Google Webmail) Login Problem (General questions)

by ill33t @, (5248 days ago)

Hi, having trouble using this control to work on google.com/mail

Here is my Code:

Private Sub Command3_Click()
hg.Request.UserAgent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
hg.Get https://www.google.com/accounts/ServiceLogin
End Sub

Private Sub hg_Done(ByVal ErrorCode As Long, ByVal ErrorText As String)
Dim strData As String
strData = hg.Response.Body
strCookie = hg.Response.Cookies.ToString
txtData.Text = strData
If InStr(1, strData, GALX ) Then
strDSH = Split(strData, name= dsh )(1)
strDSH = Split(strDSH, /> )(0)
strDSH = Split(strDSH, value= )(1)
strDSH = Split(strDSH, )(0)

strGALX = Split(strData, name= GALX )(1)
strGALX = Split(strGALX, /> )(0)
strGALX = Split(strGALX, value= )(1)
strGALX = Split(strGALX, )(0)
Debug.Print strDSH
Debug.Print strGALX
'ltmpl=default&ltmplcache=2&continue=http 3A 2F 2Fmail.google.com 2Fmail 2F 3F&service=mail&rm=false&dsh=-8736160190816270306&ltmpl=default&ltmpl=default&scc=1&timeStmp=&secTok=&GALX=QzhFCiCSCw4&Email=removed&Passwd=removed&rmShown=1&signIn=Sign+in&asts=
hg.Request.Referer = hg.URL
hg.Request.Cookies.Add GALX , strGALX
hg.Request.UserAgent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
hg.Request.FormPost.Add ltmpl , default
hg.Request.FormPost.Add ltmplcache , 2
hg.Request.FormPost.Add continue , http 3A 2F 2Fmail.google.com 2Fmail 2F 3F&service=mail
hg.Request.FormPost.Add rm , false
hg.Request.FormPost.Add dsh , strDSH
hg.Request.FormPost.Add scc , 1
hg.Request.FormPost.Add timeStmp ,
hg.Request.FormPost.Add secTok ,
hg.Request.FormPost.Add GALX , strGALX
hg.Request.FormPost.Add Email , removed
hg.Request.FormPost.Add Passwd , removed
hg.Request.FormPost.Add rmShown , 1
hg.Request.FormPost.Add signIn , Sign+in
hg.Request.FormPost.Add asts ,
hg.URL = https://www.google.com/accounts/ServiceLoginAuth
hg.Post https://www.google.com/accounts/ServiceLoginAuth
End If
End Sub

There are a few more steps after this part of the login but I can't even get past the 2nd step.


The Data that is returned says: The page you requested is invalid

Anyone see what I'm doing wrong here?

locked

Re: GMAIL(Google Webmail) Login Problem

by woddrazen @, (5248 days ago) @ ill33t

Hi,


Did you try to use some HTTP/HTTPS analyzing tool and check what should be send to login to your gmail account?

You can try HttpFox for Firefox or IEWatch for Internet Explorer.

Please use this code to send cookies to server:
[code]Dim j as Integer
For j = 0 To http1.Response.Cookies.Count - 1
http1.Request.Cookies.Add http1.Response.Cookies(j).Name, http1.Response.Cookies(j).Value
Next j[/code]
Also you are running your code from inside Done Event. Done Event is good place to execute next command but code you are using there is running in a loop. When your code is executed for a first time again Done Event will be fired and same code will be executed again.

Let us know ho wit goes.


Regards,
Drazen

locked

Re: GMAIL(Google Webmail) Login Problem

by ihutee, (5248 days ago) @ woddrazen

I am having this issue as well with CREATION. The program was working perfectly prior to a few days ago. Sending all the same data as I was before. Now it will not work and I receive the same error. Can WodHTTPDlx not communicate with gmail correctly anymore. I cannot create a single account.

If I send you an example would you mind helping? I can't seem to get your control to work.

locked

Re: GMAIL(Google Webmail) Login Problem

by woddrazen @, (5248 days ago) @ ihutee

Hi,


You mention that wodHttpDLX worked with Gmail till now.

So most probably Gmail changed something and you cannot use same request (same wodHttpDLX code) to connect to Gmail server.

Can you maybe check this out and try to modify wodHttpDLX code? Most probably using some HTTP/HTTPS analyzing tool will help you with this.


Drazen

locked

Re: GMAIL(Google Webmail) Login Problem

by ihutee, (5248 days ago) @ woddrazen

i have sent you an example of my problem including captcha! this example was working 2-3 days ago!

ill33t, when he explains this to me, i will help you as well with the solution. this will fix BOTH of our issues!

locked

Re: GMAIL(Google Webmail) Login Problem

by ihutee, (5248 days ago) @ ihutee

I logged the packets and they are the EXACT same. I used HTTPFOX. It logged the same packets/postdata/urls. I then used LIVE HTTP HEADERS and it showed the same packets/postdata/urls.

Do you have access to Skype?

locked

Re: GMAIL(Google Webmail) Login Problem

by ill33t @, (5247 days ago) @ ihutee

i have sent you an example of my problem including captcha! this example was working 2-3 days ago!

ill33t, when he explains this to me, i will help you as well with the solution. this will fix BOTH of our issues!

Thanks man, Its killing me cause I checked my data many times.

locked

Re: GMAIL(Google Webmail) Login Problem

by ill33t @, (5247 days ago) @ ill33t

Hi,


Did you try to use some HTTP/HTTPS analyzing tool and check what should be send to login to your gmail account?

You can try HttpFox for Firefox or IEWatch for Internet Explorer.

Please use this code to send cookies to server:
[code]Dim j as Integer
For j = 0 To http1.Response.Cookies.Count - 1
http1.Request.Cookies.Add http1.Response.Cookies(j).Name, http1.Response.Cookies(j).Value
Next j[/code]
Also you are running your code from inside Done Event. Done Event is good place to execute next command but code you are using there is running in a loop. When your code is executed for a first time again Done Event will be fired and same code will be executed again.

Let us know ho wit goes.


Regards,
Drazen

Yea, I've switched my cookies out to be setup like you did. Still does the same thing. As for it looping, there is no loop as there is an if statement before the post.

locked

Re: GMAIL(Google Webmail) Login Problem

by woddrazen @, (5247 days ago) @ ill33t

Josh,


I replied to your ticket. We can continue our conversation there.


Drazen

locked

Re: GMAIL(Google Webmail) Login Problem

by ihutee, (5247 days ago) @ woddrazen

Josh,


I replied to your ticket. We can continue our conversation there.


Drazen

Yes I have replied to your email.

locked

Re: GMAIL(Google Webmail) Login Problem

by ill33t @, (5247 days ago) @ ihutee

Josh,


I replied to your ticket. We can continue our conversation there.


Drazen

Yes I have replied to your email.


Any luck yet?

locked

Re: GMAIL(Google Webmail) Login Problem

by wodDamir @, (5245 days ago) @ ill33t

ill33t,

Although me and my colleague are able to create a sample and an account, the same solution doesn't seem to work for ihutee for some reason unknown to us.

The solution in our case was to make an additional GET to a page that sends a cookie to the client.

As for logging into GMail, you'll need to parse the JavaScript (or meta refresh) redirection page to and do a GET on it. Please note that you do *NEED* to process multiple gets in case of GMail, since not all cookies are generated at the same place. Once done, you should receive SID cookie which is passed to all your subsequent requests, since that's your session ID.

Regards,
Damba

locked