Problem with a specific User-Agent (General questions)
When I am attempting to login to hotmail/live through their mobile site while using a IPhone user agent header, it is basically redirecting me to the login page. After doing reading on your forums, I believe this MAY be because wodHttp cannot support the javascript. But since human error can play a big factor, I wanted to post my code here anyway so you can see if I'm doing anything wrong.
frmMain.wodHttp(Index).Request.UserAgent = Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543 Safari/419.3
frmMain.wodHttp(Index).Request.FormPost.Add __EVENTTARGET ,
frmMain.wodHttp(Index).Request.FormPost.Add __EVENTARGUMENT ,
frmMain.wodHttp(Index).Request.FormPost.Add LoginTextBox , UserName(Index)
frmMain.wodHttp(Index).Request.FormPost.Add PasswordTextBox , Passwd(Index)
frmMain.wodHttp(Index).Request.FormPost.Add PasswordSubmit , Sign+in
frmMain.wodHttp(Index).Secure = ProtAll
frmMain.wodHttp(Index).AutoRedirect = True
doWhat(Index) = 1
frmMain.wodHttp(Index).Post https://mid.live.com/si/login.aspx?wa=wsignin1.0&rpsnv=11&ct=1287214694&rver=6.1.6206.0&wp=MBI&wreply=http 3a 2f 2fmail.live.com 2fm 2fdefault.aspx&lc=1033&id=64855&mspco=1&__ufps=304528
This is the original packet from HTTPLook.
https://mid.live.com/si/login.aspx?wa=wsignin1.0&rpsnv=11&ct=1287214694&rver=6.1.6206.0&wp=MBI&wreply=http 3a 2f 2fmail.live.com 2fm 2fdefault.aspx&lc=1033&id=64855&mspco=1&__ufps=304528#InitPos
POST /si/login.aspx?wa=wsignin1.0&rpsnv=11&ct=1287214694&rver=6.1.6206.0&wp=MBI&wreply=http 3a 2f 2fmail.live.com 2fm 2fdefault.aspx&lc=1033&id=64855&mspco=1&__ufps=304528 HTTP/1.1
Host: mid.live.com
User-Agent: Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543 Safari/419.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: https://mid.live.com/si/login.aspx?wa=wsignin1.0&rpsnv=11&ct=1287214694&rver=6.1.6206.0&wp=MBI&wreply=http 3a 2f 2fmail.live.com 2fm 2fdefault.aspx&lc=1033&id=64855&mspco=1&__ufps=091237
Cookie: ANON=A=E2ABBDB4C45109253DE1D8DEFFFFFFFF&E=a84&W=1; mkt0=en-US; MUID=08CE06F04EA745B787669DC11F0C9D53; NAP=V=1.9&E=a2a&C=FJzGCk1y2HsSXY2XOVZO1KAyb77xFrVFmiwVbO0uZVL14yTs3orL1A&W=4; wlp=A|e9vJ-t:a*5x47AQ._|KeCm-t:a*0eCIAw._|n6qZ-t:a*Pld9Aw._; wlidperf=throughput=2&latency=1414&FR=L&ST=1289986762025; IsUpLevel=1; wla42=; xid=b12ebe8b-a545-4494-9579-9b827c65d1db&pRoAQ&SNTxxx-w54&369; xidseq=34; mktstate=S=-1421699662&U=en-us&B=en-us&E=&P=-us; mkt1=norm=en-us; E=P:StHsaVJUzYg=:sEh0x6sntOtwkLOMXuvsAvid9e4tp9E2Hcc+t/0Ty44=:F; lc=en-US; HIC=8cbf5065ce027d36|0|10|; wls=A|e9vJ-t:a*mS|KeCm-t:a*m; wlxmcrmpv=r=0&pv=6; BP=VID=0.8413&VC=0&RC=7<T=1289984664209&FR=WC.Hotmail 2AHome.index.M.A 2A&ST=1289985266917&l=WC.Hotmail&p=0; LN=v5XJh1289985266912 26c88b 2611; MH=MSFT; wlv=A|e9vJ-d:s*/BRqBQ.4+1+0+1; PPLState=1
Content-Type: application/x-www-form-urlencoded
Content-Length: 120
__EVENTTARGET=&__EVENTARGUMENT=&LoginTextBox=email@address.com&PasswordTextBox=mypassword&PasswordSubmit=Sign+in
Re: Problem with a specific User-Agent
Hi Moony,
Did you try to use some HTTP/HTTPS analyzer tool like IEWatch of HTTFox and see what data should be send for authentication with this server?
Also I don't see that you are sending cookies? Are you sure that cookies is not used at all?
Let us know how it goes.
Regards,
Drazen
Re: Problem with a specific User-Agent
Yes, with HTTPFox, It shows me I'm sending all the POST info needed. As far as the cookie... I have the cookie logged with HTTFox, but I'm not sure what it should be since it's a login page. I've seen cookies in the past, but never had to send them.
Re: Problem with a specific User-Agent
Moony,
First you need to go to hotmail/live login page using Get Method in wodHttpDLX. Then collect cookie there using Cookies Property from HttpResponse object and send then using Post Method.
Drazen
Re: Problem with a specific User-Agent
Moony,
First you need to go to hotmail/live login page using Get Method in wodHttpDLX. Then collect cookie there using Cookies Property from HttpResponse object and send then using Post Method.
Drazen
OK, got it working. Thank you.
Re: Problem with a specific User-Agent
Moony,
Excellent! I'm happy to hear such good news.
Drazen