Reputation: 9
Here is a similar question already. I am trying to simulate a browser like behaviour of my script to login into hotmail using http requests and cookies. I found this link which shows how to login to facebook using http requests in c#.
I am using PHP Pear HTTP_Request2 package to simulate this. I was able to render the login page but I cannot login.
I googled about how to login into Hotmail.com and found someone saying that hotmail is CSRF protected and i cannot achieve this. But i think there might be a solution because i am using a server side script to make the request so there is no chance of csrf. If anyone has done this before, i would highly appreciate some help.
Upvotes: 0
Views: 492
Reputation: 180023
But i think there might be a solution because i am using a server side script to make the request so there is no chance of csrf.
That's irrelevant - Hotmail has no idea that the request comes from a server rather than a browser, and even if they did, chances are they wouldn't want you accessing their systems automatically (as the most common use for that is probably registering accounts en masse to use for spamming).
You'd need to fetch the CSRF token and include it with your subsequent login request, along with the Hotmail session cookies. I'd expect to run into further protections intended to prevent automated access like this (captchas and the like).
Upvotes: 1