php - Steam curl login - get cookie + sessionid (Multiple requests?) -
i'm trying sessionid , cookie steam login.
when login manually , check network responses, can see info need. it's located in dologin/
http://imgur.com/a/zfwaq - first image getrsakey/ , second image dologin/
on second image marked need red box. think need browserid , steammachineauth.
$url = "https://steamcommunity.com/login/getrsakey/"; $params = ['username' => "myusername", 'password' => "mypassword"]; $cookie_jar = tempnam('/tmp', 'cookie'); $session = curl_init($url); curl_setopt($session, curlopt_post, true); curl_setopt($session, curlopt_postfields, $params); curl_setopt($session, curlopt_header, 1); curl_setopt($session, curlopt_followlocation, true); curl_setopt($session, curlopt_returntransfer, 1); curl_setopt($session, curlopt_timeout, 30); curl_setopt($session, curlopt_maxredirs, 10); curl_setopt($session, curlopt_ssl_verifypeer, false); curl_setopt($session, curlopt_cookiejar, $cookie_jar); $response = curl_exec($session); die(var_dump($cookie_jar)); curl_close($session); with curl above, seems getrsakey/ stats obvious reasons. tried making second curl request cookiejar made, , request dologin/ i'm getting
"{"success":false}bool(true)}"
tldr: need browserid , steammachineauth dologin/ - see link above (second image) whole cookie if possible.
i know time after question added, think might still need answer.
as said, need make second request dologin/ not cookiejar made.
first of when send request getrsakey/ need username parameter (password not needed).
than in response rsa key need encrypt password using rsa method (key divided key modulus , key exponent).
rsa encrypted password needs encoded base64 , password parameter send dologin/
but unfortunately steam might want captcha code and/or steamguard code if account protected, need implement well.
i don't have working php code, may steambot writen in c# , write code based on it. search dologin method in steamweb.cs file: https://github.com/jessecar96/steambot/blob/master/steamtrade/steamweb.cs#l88
Comments
Post a Comment