1. BanDiTuK02.05.2025 в 15:36от
Загрузка...
Загрузка...

Вопрос - Авторизация Steam с помощью PHP(Rsa шифровка)

Тема в разделе "Web-программирование", создана пользователем Denis666666, 04.10.2015.

  1. Denis666666

    Denis666666

    Статус:
    Оффлайн
    Регистрация:
    15.05.14
    Сообщения:
    12
    Репутация:
    2 +/-
    Привет, пытаюсь авторизоваться в Steam с помощью PHP, но все без успешно, есть какие-то догадки в чем может быть проблема?

    Думаю проблема в шифровке пароля, все мои попытки авторизоваться кончались этим

    [​IMG]


    PHP:
    $user "login";
    include(
    'Math/BigInteger.php');
    include(
    'Crypt/RSA.php');
    $url 'https://store.steampowered.com/login/getrsakey/';
    $data = array('username' => $user);      

    $options = array(
        
    'http' => array(
            
    'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
            
    'method'  => 'POST',
            
    'content' => http_build_query($data),
        ),
    );
    $context  stream_context_create($options);
    $result file_get_contents($urlfalse$context);
    $result json_decode($result);

    $rsa = new Crypt_RSA();
    $key = array(
        
    'n' => new Math_BigInteger($result->publickey_mod,16),
        
    'e' => new Math_BigInteger($result->publickey_exp,16)
    );
    $rsa->loadKey($key);
    $password base64_encode($rsa->encrypt("password"));

    $data = array(
        
    'username' => $user,
        
    'password' => $password,
        
    'twofactorcode'=> "",
        
    'emailauth'=> "",
        
    'loginfriendlyname'=> "",
        
    'captchagid'=> $gid,
        
    'captcha_text'=> $captcha_text,
        
    'emailsteamid'=> "",
        
    'rsatimestamp'=> $result->timestamp,
        
    'remember_login'=> "false"
    );
    $options = array(
        
    'http' => array(
            
    'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
            
    'method'  => 'POST',
            
    'content' => http_build_query($data),
        ),
    );

    $url 'https://store.steampowered.com/login/dologin/';


    $context  stream_context_create($options);
    echo 
    $result file_get_contents($urlfalse$context);
    $resultjson_decode($result);