I am trying to simulate login to hotmail.com using proper HTTP requests and cookies. I am using PEAR HTTP_Request2 package for handling these http requests. I have successfully rendered the Login Page >> https://login.live.com/login.srf?wa=wsignin1.0&rpsnv=12&ct=1408039901&rver=6.4.6456.0&wp=MBI&wreply=http:%2F%2Fmail.live.com%2Fdefault.aspx&lc=1033&id=64855&mkt=en-us&cbcxt=mai&snsc=1.
When i try to login to the page, i am again directed to the login page, while all the headers are correct.
I used Mozilla FireFox Addon called Live HTTP Headers to see what are the headers sent to the server. This addon shows all the headers sent to the server. I found out the requested URL sent a query string some thing like this
login=MY_EMAIL&passwd=PASSWORD&type=11&PPFT=CvL2Pz1Eg19wqz86n6Ykvz*gM%21oIj0GIZqv6sSIxdESOf7hQ%21IrGttfCQ4Sc6zLOGU7*117q*q4z*RosEo06eHZiFo133hYWuVBPAhGm8PyBL3HGWNufBIP7LuAyNvRheFtrm2TjsH3rWhIlCM9iL4FG3fnF9Tjyg5UywlJ3UAVmeo7WXj6Rl72Ia%21B*ckAcOhueoyViNYOU9Y3mZYbQb0guyO3Nrvida3zvWzftoC6CzaXgyodtLgobNXT0Qw%21Exw%24%24&PPSX=PassportR&idsbho=1&sso=0&NewUser=1&LoginOptions=3&i1=0&i2=1&i3=24027&i4=0&i7=0&i12=1&i13=0&i14=2820&i15=18351&i17=0&i18=__Login_Strings%7C1%2C__Login_Core%7C1%2C
I took some time to look into the rendered page and found that these query strings are added by Javascript loaded with the page and until i don't send the correct query strings beside the email and password, I won't be able to login to the page.
I Figured out some of these query strings
type (Always constant)
PPFT (Comes from variable ServerData)
PPSX (could not figure out)
idshbo (Always constant)
sso (Always constant)
NewUser (Always constant)
LoginOptions (Always constant)
i1 (Always constant)
i2 (Always constant)
i3 (could not figure out)
i4 (Always constant)
i7 (Always contant)
i12 (Always constant)
i13 (Always constant)
i14 (could not figure out)
i15 (could not figure out)
i17 (Always constant)
i18 (Always constant)
These query strings are generated from the following .js script
I am not sure about what i am doing is right or not. Is there any alternative way? I have two days time to reach upto here but now i am stuck.