diff options
| author | George Hazan <george.hazan@gmail.com> | 2023-06-15 19:18:04 +0300 |
|---|---|---|
| committer | George Hazan <george.hazan@gmail.com> | 2023-06-15 19:18:04 +0300 |
| commit | 4a2a1a80bc29ec2dc13e8dd053671431eb36fe2a (patch) | |
| tree | 24a8d499cbbdaa1e998b289eebce7e918fda8fdc /protocols/Steam/src/api | |
| parent | d85347f1f2028afb685142a776f2af4473de8273 (diff) | |
Steam: complete login sequence (though always gives us "Invalid password" error)
Diffstat (limited to 'protocols/Steam/src/api')
| -rw-r--r-- | protocols/Steam/src/api/authorization.h | 31 | ||||
| -rw-r--r-- | protocols/Steam/src/api/login.h | 46 | ||||
| -rw-r--r-- | protocols/Steam/src/api/session.h | 35 |
3 files changed, 0 insertions, 112 deletions
diff --git a/protocols/Steam/src/api/authorization.h b/protocols/Steam/src/api/authorization.h deleted file mode 100644 index fdaec9920d..0000000000 --- a/protocols/Steam/src/api/authorization.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef _STEAM_REQUEST_AUTHORIZATION_H_
-#define _STEAM_REQUEST_AUTHORIZATION_H_
-
-class AuthorizationRequest : public HttpRequest
-{
-public:
- AuthorizationRequest(const char *username, const char *password, const char *timestamp, const char *twoFactorCode, const char *guardCode, const char *guardId = "", const char *captchaId = "-1", const char *captchaText = "") :
- HttpRequest(REQUEST_POST, STEAM_WEB_URL "/mobilelogin/dologin/")
- {
- flags = NLHRF_HTTP11 | NLHRF_SSL | NLHRF_NODUMP;
-
- AddHeader("Referer", STEAM_WEB_URL "/mobilelogin/dologin?oauth_client_id=3638BFB1&oauth_scope=read_profile%20write_profile%20read_client%20write_client");
- AddHeader("Cookie", "mobileClientVersion=1291812;forceMobile=1;mobileClient=ios");
-
- this
- << CHAR_PARAM("oauth_client_id", "3638BFB1")
- << CHAR_PARAM("loginfriendlyname", "Miranda NG")
- << CHAR_PARAM("password", password)
- << CHAR_PARAM("username", username)
- << CHAR_PARAM("twofactorcode", twoFactorCode)
- << CHAR_PARAM("emailsteamid", guardId)
- << CHAR_PARAM("emailauth", guardCode)
- << CHAR_PARAM("captchagid", captchaId)
- << CHAR_PARAM("captcha_text", captchaText)
- << CHAR_PARAM("rsatimestamp", timestamp)
- << INT_PARAM("rememberlogin", 0)
- << INT64_PARAM("donotcache", now());
- }
-};
-
-#endif //_STEAM_REQUEST_AUTHORIZATION_H_
diff --git a/protocols/Steam/src/api/login.h b/protocols/Steam/src/api/login.h deleted file mode 100644 index ece955840d..0000000000 --- a/protocols/Steam/src/api/login.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef _STEAM_REQUEST_LOGIN_H_
-#define _STEAM_REQUEST_LOGIN_H_
-
-class LogonRequest : public HttpRequest
-{
-public:
- LogonRequest(const char *token) :
- HttpRequest(REQUEST_POST, "/ISteamWebUserPresenceOAuth/Logon/v0001")
- {
- char data[256];
- mir_snprintf(data, "access_token=%s&ui_mode=web", token);
-
- this
- << CHAR_PARAM("access_token", token)
- << CHAR_PARAM("ui_mode", "web");
- }
-
- //{
- // "steamid": "XXXXXXXXXXXXXXXXX",
- // "error" : "OK",
- // "umqid" : "XXXXXXXXXXXXXXXXXXX",
- // "timestamp" : 16955891,
- // "utc_timestamp" : 1514974537,
- // "message" : 1,
- // "push" : 0
- //}
-
-};
-
-class LogoffRequest : public HttpRequest
-{
-public:
- LogoffRequest(const char *token, const char *umqId) :
- HttpRequest(REQUEST_POST, "/ISteamWebUserPresenceOAuth/Logoff/v0001")
- {
- this
- << CHAR_PARAM("access_token", token)
- << CHAR_PARAM("umqid", umqId);
- }
-
- //{
- // "error": "OK"
- //}
-};
-
-#endif //_STEAM_REQUEST_LOGIN_H_
diff --git a/protocols/Steam/src/api/session.h b/protocols/Steam/src/api/session.h index 8c7351db6f..e747c2e65f 100644 --- a/protocols/Steam/src/api/session.h +++ b/protocols/Steam/src/api/session.h @@ -8,39 +8,4 @@ struct GetHostsRequest : public HttpRequest {}
};
-struct GetSessionRequest : public HttpRequest
-{
- GetSessionRequest(const char *token, const char *steamId, const char *cookie) :
- HttpRequest(REQUEST_POST, STEAM_WEB_URL "/mobileloginsucceeded")
- {
- flags = NLHRF_HTTP11 | NLHRF_SSL | NLHRF_NODUMP;
-
- this
- << CHAR_PARAM("oauth_token", token)
- << CHAR_PARAM("steamid", steamId)
- << CHAR_PARAM("webcookie", cookie);
-
- char data[512];
- mir_snprintf(data, _countof(data),
- "oauth_token=%s&steamid=%s&webcookie=%s",
- token,
- steamId,
- cookie);
- }
-};
-
-struct GetSessionRequest2 : public HttpRequest
-{
- GetSessionRequest2(const char *token, const char *steamId) :
- HttpRequest(REQUEST_GET, STEAM_WEB_URL "/mobilesettings/GetManifest/v0001")
- {
- flags = NLHRF_HTTP11 | NLHRF_SSL | NLHRF_NODUMPHEADERS;
-
- char cookie[MAX_PATH];
- mir_snprintf(cookie, "steamLogin=%s||oauth:%s", steamId, token);
-
- AddHeader("Cookie", cookie);
- }
-};
-
#endif //_STEAM_REQUEST_SESSION_H_
|
