views:

2448

answers:

1

I I'm trying to login to live.com via cURL

Has anyone tried that before? Could you then post your script?

Thanks

I'm now using this command...

curl --cookie cjar3 --cookie-jar cjar3 --data 'PPSX=P&PwdPad=&type=&[email protected]&passwd=xxxxxxxxx&SI= Accedi &radio=2' --location --output /home/mauripz/temp/Nuova/loginresult.html https://login.live.com/ppsecure/post.srf

but I get a "Wrong email or password" error

UPDATED: using only one --data but still get the same error

+2  A: 

Unfortunately I haven't done this for live.com so I cannot provide you with a script. However I ran into a similar situation while doing a cURL login to Salesforce.com and hopefully can point you in the right direction.

The login form for live.com has a onsubmit function called OnSigninSubmit. The script is located in (https://login.live.com/pp650/JS/PPPrimary.js?x=6.5.11760.0) and has been minimized by MS. I've made it a little more readable in http://pastebin.com/f34f2593b .

It's possible that in an effort to prevent scripts spamming login forms Microsoft manipulate the form data and add extra fields or modify the fields you submit with their Javascript functions. You need to recreate those conditions for the username/password you want to submit.