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 | |
parent | d85347f1f2028afb685142a776f2af4473de8273 (diff) |
Steam: complete login sequence (though always gives us "Invalid password" error)
Diffstat (limited to 'protocols/Steam/src')
-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 | ||||
-rw-r--r-- | protocols/Steam/src/main.cpp | 2 | ||||
-rw-r--r-- | protocols/Steam/src/proto.h | 1985 | ||||
-rw-r--r-- | protocols/Steam/src/protobuf-c/protobuf-c.h | 5 | ||||
-rw-r--r-- | protocols/Steam/src/stdafx.h | 6 | ||||
-rw-r--r-- | protocols/Steam/src/steam_avatars.cpp | 2 | ||||
-rw-r--r-- | protocols/Steam/src/steam_contacts.cpp | 14 | ||||
-rw-r--r-- | protocols/Steam/src/steam_history.cpp | 2 | ||||
-rw-r--r-- | protocols/Steam/src/steam_login.cpp | 422 | ||||
-rw-r--r-- | protocols/Steam/src/steam_menus.cpp | 14 | ||||
-rw-r--r-- | protocols/Steam/src/steam_messages.cpp | 6 | ||||
-rw-r--r-- | protocols/Steam/src/steam_options.cpp | 2 | ||||
-rw-r--r-- | protocols/Steam/src/steam_proto.cpp | 31 | ||||
-rw-r--r-- | protocols/Steam/src/steam_proto.h | 63 | ||||
-rw-r--r-- | protocols/Steam/src/steam_server.cpp | 109 | ||||
-rw-r--r-- | protocols/Steam/src/steam_utils.cpp | 39 |
18 files changed, 2382 insertions, 432 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_
diff --git a/protocols/Steam/src/main.cpp b/protocols/Steam/src/main.cpp index 9daabf1e60..be3991d116 100644 --- a/protocols/Steam/src/main.cpp +++ b/protocols/Steam/src/main.cpp @@ -23,7 +23,7 @@ PLUGININFOEX pluginInfoEx = CMPlugin::CMPlugin() :
ACCPROTOPLUGIN<CSteamProto>("STEAM", pluginInfoEx)
{
- SetUniqueId("SteamID");
+ SetUniqueId(DBKEY_STEAM_ID);
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/Steam/src/proto.h b/protocols/Steam/src/proto.h new file mode 100644 index 0000000000..2d1f07bf6a --- /dev/null +++ b/protocols/Steam/src/proto.h @@ -0,0 +1,1985 @@ +#pragma once + +enum EMsg +{ + Invalid = 0, + Multi = 1, + ProtobufWrapped = 2, + BaseGeneral = 100, + GenericReply = 100, + DestJobFailed = 113, + Alert = 115, + SCIDRequest = 120, + SCIDResponse = 121, + JobHeartbeat = 123, + HubConnect = 124, + Subscribe = 126, + RouteMessage = 127, + RemoteSysID = 128, + AMCreateAccountResponse = 129, + WGRequest = 130, + WGResponse = 131, + KeepAlive = 132, + WebAPIJobRequest = 133, + WebAPIJobResponse = 134, + ClientSessionStart = 135, + ClientSessionEnd = 136, + ClientSessionUpdateAuthTicket = 137, + ClientSessionUpdate = 137, + StatsDeprecated = 138, + Ping = 139, + PingResponse = 140, + Stats = 141, + RequestFullStatsBlock = 142, + LoadDBOCacheItem = 143, + LoadDBOCacheItemResponse = 144, + InvalidateDBOCacheItems = 145, + ServiceMethod = 146, + ServiceMethodResponse = 147, + ClientPackageVersions = 148, + TimestampRequest = 149, + TimestampResponse = 150, + ServiceMethodCallFromClient = 151, + ServiceMethodSendToClient = 152, + BaseShell = 200, + AssignSysID = 200, + Exit = 201, + DirRequest = 202, + DirResponse = 203, + ZipRequest = 204, + ZipResponse = 205, + UpdateRecordResponse = 215, + UpdateCreditCardRequest = 221, + UpdateUserBanResponse = 225, + PrepareToExit = 226, + ContentDescriptionUpdate = 227, + TestResetServer = 228, + UniverseChanged = 229, + ShellConfigInfoUpdate = 230, + RequestWindowsEventLogEntries = 233, + ProvideWindowsEventLogEntries = 234, + ShellSearchLogs = 235, + ShellSearchLogsResponse = 236, + ShellCheckWindowsUpdates = 237, + ShellCheckWindowsUpdatesResponse = 238, + ShellFlushUserLicenseCache = 239, + TestFlushDelayedSQL = 240, + TestFlushDelayedSQLResponse = 241, + EnsureExecuteScheduledTask_TEST = 242, + EnsureExecuteScheduledTaskResponse_TEST = 243, + UpdateScheduledTaskEnableState_TEST = 244, + UpdateScheduledTaskEnableStateResponse_TEST = 245, + ContentDescriptionDeltaUpdate = 246, + GMShellAndServerAddressUpdates = 247, + BaseGM = 300, + Heartbeat = 300, + ShellFailed = 301, + ExitShells = 307, + ExitShell = 308, + GracefulExitShell = 309, + LicenseProcessingComplete = 316, + SetTestFlag = 317, + QueuedEmailsComplete = 318, + GMReportPHPError = 319, + GMDRMSync = 320, + PhysicalBoxInventory = 321, + UpdateConfigFile = 322, + TestInitDB = 323, + GMWriteConfigToSQL = 324, + GMLoadActivationCodes = 325, + GMQueueForFBS = 326, + GMSchemaConversionResults = 327, + GMSchemaConversionResultsResponse = 328, + GMWriteShellFailureToSQL = 329, + GMWriteStatsToSOS = 330, + GMGetServiceMethodRouting = 331, + GMGetServiceMethodRoutingResponse = 332, + GMConvertUserWallets = 333, + GMTestNextBuildSchemaConversion = 334, + GMTestNextBuildSchemaConversionResponse = 335, + ExpectShellRestart = 336, + HotFixProgress = 337, + GMStatsForwardToAdminConnections = 338, + GMGetModifiedConVars = 339, + GMGetModifiedConVarsResponse = 340, + BaseAIS = 400, + AISRefreshContentDescription = 401, + AISRequestContentDescription = 402, + AISUpdateAppInfo = 403, + AISUpdatePackageCosts = 404, + AISUpdatePackageInfo = 404, + AISGetPackageChangeNumber = 405, + AISGetPackageChangeNumberResponse = 406, + AISAppInfoTableChanged = 407, + AISUpdatePackageCostsResponse = 408, + AISCreateMarketingMessage = 409, + AISCreateMarketingMessageResponse = 410, + AISGetMarketingMessage = 411, + AISGetMarketingMessageResponse = 412, + AISUpdateMarketingMessage = 413, + AISUpdateMarketingMessageResponse = 414, + AISRequestMarketingMessageUpdate = 415, + AISDeleteMarketingMessage = 416, + AISGetMarketingTreatments = 419, + AISGetMarketingTreatmentsResponse = 420, + AISRequestMarketingTreatmentUpdate = 421, + AISTestAddPackage = 422, + AIGetAppGCFlags = 423, + AIGetAppGCFlagsResponse = 424, + AIGetAppList = 425, + AIGetAppListResponse = 426, + AIGetAppInfo = 427, + AIGetAppInfoResponse = 428, + AISGetCouponDefinition = 429, + AISGetCouponDefinitionResponse = 430, + AISUpdateSlaveContentDescription = 431, + AISUpdateSlaveContentDescriptionResponse = 432, + AISTestEnableGC = 433, + BaseAM = 500, + AMUpdateUserBanRequest = 504, + AMAddLicense = 505, + AMBeginProcessingLicenses = 507, + AMSendSystemIMToUser = 508, + AMExtendLicense = 509, + AMAddMinutesToLicense = 510, + AMCancelLicense = 511, + AMInitPurchase = 512, + AMPurchaseResponse = 513, + AMGetFinalPrice = 514, + AMGetFinalPriceResponse = 515, + AMGetLegacyGameKey = 516, + AMGetLegacyGameKeyResponse = 517, + AMFindHungTransactions = 518, + AMSetAccountTrustedRequest = 519, + AMCompletePurchase = 521, + AMCancelPurchase = 522, + AMNewChallenge = 523, + AMLoadOEMTickets = 524, + AMFixPendingPurchase = 525, + AMFixPendingPurchaseResponse = 526, + AMIsUserBanned = 527, + AMRegisterKey = 528, + AMLoadActivationCodes = 529, + AMLoadActivationCodesResponse = 530, + AMLookupKeyResponse = 531, + AMLookupKey = 532, + AMChatCleanup = 533, + AMClanCleanup = 534, + AMFixPendingRefund = 535, + AMReverseChargeback = 536, + AMReverseChargebackResponse = 537, + AMClanCleanupList = 538, + AMGetLicenses = 539, + AMGetLicensesResponse = 540, + AMSendCartRepurchase = 541, + AMSendCartRepurchaseResponse = 542, + AllowUserToPlayQuery = 550, + AllowUserToPlayResponse = 551, + AMVerfiyUser = 552, + AMClientNotPlaying = 553, + ClientRequestFriendship = 554, + AMClientRequestFriendship = 554, + AMRelayPublishStatus = 555, + AMResetCommunityContent = 556, + AMPrimePersonaStateCache = 557, + AMAllowUserContentQuery = 558, + AMAllowUserContentResponse = 559, + AMInitPurchaseResponse = 560, + AMRevokePurchaseResponse = 561, + AMLockProfile = 562, + AMRefreshGuestPasses = 563, + AMInviteUserToClan = 564, + AMAcknowledgeClanInvite = 565, + AMGrantGuestPasses = 566, + AMClanDataUpdated = 567, + AMReloadAccount = 568, + AMClientChatMsgRelay = 569, + AMChatMulti = 570, + AMClientChatInviteRelay = 571, + AMChatInvite = 572, + AMClientJoinChatRelay = 573, + AMClientChatMemberInfoRelay = 574, + AMPublishChatMemberInfo = 575, + AMClientAcceptFriendInvite = 576, + AMChatEnter = 577, + AMClientPublishRemovalFromSource = 578, + AMChatActionResult = 579, + AMFindAccounts = 580, + AMFindAccountsResponse = 581, + AMRequestAccountData = 582, + AMRequestAccountDataResponse = 583, + AMSetAccountFlags = 584, + AMCreateClan = 586, + AMCreateClanResponse = 587, + AMGetClanDetails = 588, + AMGetClanDetailsResponse = 589, + AMSetPersonaName = 590, + AMSetAvatar = 591, + AMAuthenticateUser = 592, + AMAuthenticateUserResponse = 593, + AMGetAccountFriendsCount = 594, + AMGetAccountFriendsCountResponse = 595, + AMP2PIntroducerMessage = 596, + ClientChatAction = 597, + AMClientChatActionRelay = 598, + BaseVS = 600, + ReqChallenge = 600, + VACResponse = 601, + ReqChallengeTest = 602, + VSMarkCheat = 604, + VSAddCheat = 605, + VSPurgeCodeModDB = 606, + VSGetChallengeResults = 607, + VSChallengeResultText = 608, + VSReportLingerer = 609, + VSRequestManagedChallenge = 610, + VSLoadDBFinished = 611, + BaseDRMS = 625, + DRMBuildBlobRequest = 628, + DRMBuildBlobResponse = 629, + DRMResolveGuidRequest = 630, + DRMResolveGuidResponse = 631, + DRMVariabilityReport = 633, + DRMVariabilityReportResponse = 634, + DRMStabilityReport = 635, + DRMStabilityReportResponse = 636, + DRMDetailsReportRequest = 637, + DRMDetailsReportResponse = 638, + DRMProcessFile = 639, + DRMAdminUpdate = 640, + DRMAdminUpdateResponse = 641, + DRMSync = 642, + DRMSyncResponse = 643, + DRMProcessFileResponse = 644, + DRMEmptyGuidCache = 645, + DRMEmptyGuidCacheResponse = 646, + BaseCS = 650, + CSUserContentRequest = 652, + BaseClient = 700, + ClientLogOn_Deprecated = 701, + ClientAnonLogOn_Deprecated = 702, + ClientHeartBeat = 703, + ClientVACResponse = 704, + ClientGamesPlayed_obsolete = 705, + ClientLogOff = 706, + ClientNoUDPConnectivity = 707, + ClientInformOfCreateAccount = 708, + ClientAckVACBan = 709, + ClientConnectionStats = 710, + ClientInitPurchase = 711, + ClientPingResponse = 712, + ClientRemoveFriend = 714, + ClientGamesPlayedNoDataBlob = 715, + ClientChangeStatus = 716, + ClientVacStatusResponse = 717, + ClientFriendMsg = 718, + ClientGameConnect_obsolete = 719, + ClientGamesPlayed2_obsolete = 720, + ClientGameEnded_obsolete = 721, + ClientGetFinalPrice = 722, + ClientSystemIM = 726, + ClientSystemIMAck = 727, + ClientGetLicenses = 728, + ClientCancelLicense = 729, + ClientGetLegacyGameKey = 730, + ClientContentServerLogOn_Deprecated = 731, + ClientAckVACBan2 = 732, + ClientAckMessageByGID = 735, + ClientGetPurchaseReceipts = 736, + ClientAckPurchaseReceipt = 737, + ClientGamesPlayed3_obsolete = 738, + ClientSendGuestPass = 739, + ClientAckGuestPass = 740, + ClientRedeemGuestPass = 741, + ClientGamesPlayed = 742, + ClientRegisterKey = 743, + ClientInviteUserToClan = 744, + ClientAcknowledgeClanInvite = 745, + ClientPurchaseWithMachineID = 746, + ClientAppUsageEvent = 747, + ClientGetGiftTargetList = 748, + ClientGetGiftTargetListResponse = 749, + ClientLogOnResponse = 751, + ClientVACChallenge = 753, + ClientSetHeartbeatRate = 755, + ClientNotLoggedOnDeprecated = 756, + ClientLoggedOff = 757, + GSApprove = 758, + GSDeny = 759, + GSKick = 760, + ClientCreateAcctResponse = 761, + ClientPurchaseResponse = 763, + ClientPing = 764, + ClientNOP = 765, + ClientPersonaState = 766, + ClientFriendsList = 767, + ClientAccountInfo = 768, + ClientVacStatusQuery = 770, + ClientNewsUpdate = 771, + ClientGameConnectDeny = 773, + GSStatusReply = 774, + ClientGetFinalPriceResponse = 775, + ClientGameConnectTokens = 779, + ClientLicenseList = 780, + ClientCancelLicenseResponse = 781, + ClientVACBanStatus = 782, + ClientCMList = 783, + ClientEncryptPct = 784, + ClientGetLegacyGameKeyResponse = 785, + ClientFavoritesList = 786, + CSUserContentApprove = 787, + CSUserContentDeny = 788, + ClientInitPurchaseResponse = 789, + ClientAddFriend = 791, + ClientAddFriendResponse = 792, + ClientInviteFriend = 793, + ClientInviteFriendResponse = 794, + ClientSendGuestPassResponse = 795, + ClientAckGuestPassResponse = 796, + ClientRedeemGuestPassResponse = 797, + ClientUpdateGuestPassesList = 798, + ClientChatMsg = 799, + ClientChatInvite = 800, + ClientJoinChat = 801, + ClientChatMemberInfo = 802, + ClientLogOnWithCredentials_Deprecated = 803, + ClientPasswordChangeResponse = 805, + ClientChatEnter = 807, + ClientFriendRemovedFromSource = 808, + ClientCreateChat = 809, + ClientCreateChatResponse = 810, + ClientUpdateChatMetadata = 811, + ClientP2PIntroducerMessage = 813, + ClientChatActionResult = 814, + ClientRequestFriendData = 815, + ClientGetUserStats = 818, + ClientGetUserStatsResponse = 819, + ClientStoreUserStats = 820, + ClientStoreUserStatsResponse = 821, + ClientClanState = 822, + ClientServiceModule = 830, + ClientServiceCall = 831, + ClientServiceCallResponse = 832, + ClientPackageInfoRequest = 833, + ClientPackageInfoResponse = 834, + ClientNatTraversalStatEvent = 839, + ClientAppInfoRequest = 840, + ClientAppInfoResponse = 841, + ClientSteamUsageEvent = 842, + ClientCheckPassword = 845, + ClientResetPassword = 846, + ClientCheckPasswordResponse = 848, + ClientResetPasswordResponse = 849, + ClientSessionToken = 850, + ClientDRMProblemReport = 851, + ClientSetIgnoreFriend = 855, + ClientSetIgnoreFriendResponse = 856, + ClientGetAppOwnershipTicket = 857, + ClientGetAppOwnershipTicketResponse = 858, + ClientGetLobbyListResponse = 860, + ClientGetLobbyMetadata = 861, + ClientGetLobbyMetadataResponse = 862, + ClientVTTCert = 863, + ClientAppInfoUpdate = 866, + ClientAppInfoChanges = 867, + ClientServerList = 880, + ClientEmailChangeResponse = 891, + ClientSecretQAChangeResponse = 892, + ClientDRMBlobRequest = 896, + ClientDRMBlobResponse = 897, + ClientLookupKey = 898, + ClientLookupKeyResponse = 899, + BaseGameServer = 900, + GSDisconnectNotice = 901, + GSStatus = 903, + GSUserPlaying = 905, + GSStatus2 = 906, + GSStatusUpdate_Unused = 907, + GSServerType = 908, + GSPlayerList = 909, + GSGetUserAchievementStatus = 910, + GSGetUserAchievementStatusResponse = 911, + GSGetPlayStats = 918, + GSGetPlayStatsResponse = 919, + GSGetUserGroupStatus = 920, + AMGetUserGroupStatus = 921, + AMGetUserGroupStatusResponse = 922, + GSGetUserGroupStatusResponse = 923, + GSGetReputation = 936, + GSGetReputationResponse = 937, + GSAssociateWithClan = 938, + GSAssociateWithClanResponse = 939, + GSComputeNewPlayerCompatibility = 940, + GSComputeNewPlayerCompatibilityResponse = 941, + BaseAdmin = 1000, + AdminCmd = 1000, + AdminCmdResponse = 1004, + AdminLogListenRequest = 1005, + AdminLogEvent = 1006, + LogSearchRequest = 1007, + LogSearchResponse = 1008, + LogSearchCancel = 1009, + UniverseData = 1010, + RequestStatHistory = 1014, + StatHistory = 1015, + AdminPwLogon = 1017, + AdminPwLogonResponse = 1018, + AdminSpew = 1019, + AdminConsoleTitle = 1020, + AdminGCSpew = 1023, + AdminGCCommand = 1024, + AdminGCGetCommandList = 1025, + AdminGCGetCommandListResponse = 1026, + FBSConnectionData = 1027, + AdminMsgSpew = 1028, + BaseFBS = 1100, + FBSReqVersion = 1100, + FBSVersionInfo = 1101, + FBSForceRefresh = 1102, + FBSForceBounce = 1103, + FBSDeployPackage = 1104, + FBSDeployResponse = 1105, + FBSUpdateBootstrapper = 1106, + FBSSetState = 1107, + FBSApplyOSUpdates = 1108, + FBSRunCMDScript = 1109, + FBSRebootBox = 1110, + FBSSetBigBrotherMode = 1111, + FBSMinidumpServer = 1112, + FBSSetShellCount_obsolete = 1113, + FBSDeployHotFixPackage = 1114, + FBSDeployHotFixResponse = 1115, + FBSDownloadHotFix = 1116, + FBSDownloadHotFixResponse = 1117, + FBSUpdateTargetConfigFile = 1118, + FBSApplyAccountCred = 1119, + FBSApplyAccountCredResponse = 1120, + FBSSetShellCount = 1121, + FBSTerminateShell = 1122, + FBSQueryGMForRequest = 1123, + FBSQueryGMResponse = 1124, + FBSTerminateZombies = 1125, + FBSInfoFromBootstrapper = 1126, + FBSRebootBoxResponse = 1127, + FBSBootstrapperPackageRequest = 1128, + FBSBootstrapperPackageResponse = 1129, + FBSBootstrapperGetPackageChunk = 1130, + FBSBootstrapperGetPackageChunkResponse = 1131, + FBSBootstrapperPackageTransferProgress = 1132, + FBSRestartBootstrapper = 1133, + FBSPauseFrozenDumps = 1134, + BaseFileXfer = 1200, + FileXferRequest = 1200, + FileXferResponse = 1201, + FileXferData = 1202, + FileXferEnd = 1203, + FileXferDataAck = 1204, + BaseChannelAuth = 1300, + ChannelAuthChallenge = 1300, + ChannelAuthResponse = 1301, + ChannelAuthResult = 1302, + ChannelEncryptRequest = 1303, + ChannelEncryptResponse = 1304, + ChannelEncryptResult = 1305, + BaseBS = 1400, + BSPurchaseStart = 1401, + BSPurchaseResponse = 1402, + BSAuthenticateCCTrans = 1403, + BSSettleNOVA = 1404, + BSAuthenticateCCTransResponse = 1404, + BSSettleComplete = 1406, + BSBannedRequest = 1407, + BSInitPayPalTxn = 1408, + BSInitPayPalTxnResponse = 1409, + BSGetPayPalUserInfo = 1410, + BSGetPayPalUserInfoResponse = 1411, + BSRefundTxn = 1413, + BSRefundTxnResponse = 1414, + BSGetEvents = 1415, + BSChaseRFRRequest = 1416, + BSPaymentInstrBan = 1417, + BSPaymentInstrBanResponse = 1418, + BSProcessGCReports = 1419, + BSProcessPPReports = 1420, + BSInitGCBankXferTxn = 1421, + BSInitGCBankXferTxnResponse = 1422, + BSQueryGCBankXferTxn = 1423, + BSQueryGCBankXferTxnResponse = 1424, + BSCommitGCTxn = 1425, + BSQueryTransactionStatus = 1426, + BSQueryTransactionStatusResponse = 1427, + BSQueryCBOrderStatus = 1428, + BSQueryCBOrderStatusResponse = 1429, + BSRunRedFlagReport = 1430, + BSQueryPaymentInstUsage = 1431, + BSQueryPaymentInstResponse = 1432, + BSQueryTxnExtendedInfo = 1433, + BSQueryTxnExtendedInfoResponse = 1434, + BSUpdateConversionRates = 1435, + BSProcessUSBankReports = 1436, + BSPurchaseRunFraudChecks = 1437, + BSPurchaseRunFraudChecksResponse = 1438, + BSStartShippingJobs = 1439, + BSQueryBankInformation = 1440, + BSQueryBankInformationResponse = 1441, + BSValidateXsollaSignature = 1445, + BSValidateXsollaSignatureResponse = 1446, + BSQiwiWalletInvoice = 1448, + BSQiwiWalletInvoiceResponse = 1449, + BSUpdateInventoryFromProPack = 1450, + BSUpdateInventoryFromProPackResponse = 1451, + BSSendShippingRequest = 1452, + BSSendShippingRequestResponse = 1453, + BSGetProPackOrderStatus = 1454, + BSGetProPackOrderStatusResponse = 1455, + BSCheckJobRunning = 1456, + BSCheckJobRunningResponse = 1457, + BSResetPackagePurchaseRateLimit = 1458, + BSResetPackagePurchaseRateLimitResponse = 1459, + BSUpdatePaymentData = 1460, + BSUpdatePaymentDataResponse = 1461, + BSGetBillingAddress = 1462, + BSGetBillingAddressResponse = 1463, + BSGetCreditCardInfo = 1464, + BSGetCreditCardInfoResponse = 1465, + BSRemoveExpiredPaymentData = 1468, + BSRemoveExpiredPaymentDataResponse = 1469, + BSConvertToCurrentKeys = 1470, + BSConvertToCurrentKeysResponse = 1471, + BSInitPurchase = 1472, + BSInitPurchaseResponse = 1473, + BSCompletePurchase = 1474, + BSCompletePurchaseResponse = 1475, + BSPruneCardUsageStats = 1476, + BSPruneCardUsageStatsResponse = 1477, + BSStoreBankInformation = 1478, + BSStoreBankInformationResponse = 1479, + BSVerifyPOSAKey = 1480, + BSVerifyPOSAKeyResponse = 1481, + BSReverseRedeemPOSAKey = 1482, + BSReverseRedeemPOSAKeyResponse = 1483, + BSQueryFindCreditCard = 1484, + BSQueryFindCreditCardResponse = 1485, + BSStatusInquiryPOSAKey = 1486, + BSStatusInquiryPOSAKeyResponse = 1487, + BSValidateMoPaySignature = 1488, + BSValidateMoPaySignatureResponse = 1489, + BSMoPayConfirmProductDelivery = 1490, + BSMoPayConfirmProductDeliveryResponse = 1491, + BSGenerateMoPayMD5 = 1492, + BSGenerateMoPayMD5Response = 1493, + BSBoaCompraConfirmProductDelivery = 1494, + BSBoaCompraConfirmProductDeliveryResponse = 1495, + BSGenerateBoaCompraMD5 = 1496, + BSGenerateBoaCompraMD5Response = 1497, + BSCommitWPTxn = 1498, + BSCommitAdyenTxn = 1499, + BaseATS = 1500, + ATSStartStressTest = 1501, + ATSStopStressTest = 1502, + ATSRunFailServerTest = 1503, + ATSUFSPerfTestTask = 1504, + ATSUFSPerfTestResponse = 1505, + ATSCycleTCM = 1506, + ATSInitDRMSStressTest = 1507, + ATSCallTest = 1508, + ATSCallTestReply = 1509, + ATSStartExternalStress = 1510, + ATSExternalStressJobStart = 1511, + ATSExternalStressJobQueued = 1512, + ATSExternalStressJobRunning = 1513, + ATSExternalStressJobStopped = 1514, + ATSExternalStressJobStopAll = 1515, + ATSExternalStressActionResult = 1516, + ATSStarted = 1517, + ATSCSPerfTestTask = 1518, + ATSCSPerfTestResponse = 1519, + BaseDP = 1600, + DPSetPublishingState = 1601, + DPGamePlayedStats = 1602, + DPUniquePlayersStat = 1603, + DPStreamingUniquePlayersStat = 1604, + DPVacInfractionStats = 1605, + DPVacBanStats = 1606, + DPBlockingStats = 1607, + DPNatTraversalStats = 1608, + DPSteamUsageEvent = 1609, + DPVacCertBanStats = 1610, + DPVacCafeBanStats = 1611, + DPCloudStats = 1612, + DPAchievementStats = 1613, + DPAccountCreationStats = 1614, + DPGetPlayerCount = 1615, + DPGetPlayerCountResponse = 1616, + DPGameServersPlayersStats = 1617, + DPDownloadRateStatistics = 1618, + DPFacebookStatistics = 1619, + ClientDPCheckSpecialSurvey = 1620, + ClientDPCheckSpecialSurveyResponse = 1621, + ClientDPSendSpecialSurveyResponse = 1622, + ClientDPSendSpecialSurveyResponseReply = 1623, + DPStoreSaleStatistics = 1624, + ClientDPUpdateAppJobReport = 1625, + DPUpdateContentEvent = 1626, + ClientDPSteam2AppStarted = 1627, + ClientDPUnsignedInstallScript = 1627, + DPPartnerMicroTxns = 1628, + DPPartnerMicroTxnsResponse = 1629, + ClientDPContentStatsReport = 1630, + DPVRUniquePlayersStat = 1631, + BaseCM = 1700, + CMSetAllowState = 1701, + CMSpewAllowState = 1702, + CMAppInfoResponseDeprecated = 1703, + CMSessionRejected = 1703, + CMSetSecrets = 1704, + CMGetSecrets = 1705, + BaseDSS = 1800, + DSSNewFile = 1801, + DSSCurrentFileList = 1802, + DSSSynchList = 1803, + DSSSynchListResponse = 1804, + DSSSynchSubscribe = 1805, + DSSSynchUnsubscribe = 1806, + BaseEPM = 1900, + EPMStartProcess = 1901, + EPMStopProcess = 1902, + EPMRestartProcess = 1903, + GCSendClient = 2200, + BaseGC = 2200, + AMRelayToGC = 2201, + GCUpdatePlayedState = 2202, + GCCmdRevive = 2203, + GCCmdBounce = 2204, + GCCmdForceBounce = 2205, + GCCmdDown = 2206, + GCCmdDeploy = 2207, + GCCmdDeployResponse = 2208, + GCCmdSwitch = 2209, + AMRefreshSessions = 2210, + GCUpdateGSState = 2211, + GCAchievementAwarded = 2212, + GCSystemMessage = 2213, + GCValidateSession = 2214, + GCValidateSessionResponse = 2215, + GCCmdStatus = 2216, + GCRegisterWebInterfaces = 2217, + GCRegisterWebInterfaces_Deprecated = 2217, + GCGetAccountDetails = 2218, + GCGetAccountDetails_DEPRECATED = 2218, + GCInterAppMessage = 2219, + GCGetEmailTemplate = 2220, + GCGetEmailTemplateResponse = 2221, + ISRelayToGCH = 2222, + GCHRelay = 2222, + GCHRelayClientToIS = 2223, + GCHRelayToClient = 2223, + GCHUpdateSession = 2224, + GCHRequestUpdateSession = 2225, + GCHRequestStatus = 2226, + GCHRequestStatusResponse = 2227, + GCHAccountVacStatusChange = 2228, + GCHSpawnGC = 2229, + GCHSpawnGCResponse = 2230, + GCHKillGC = 2231, + GCHKillGCResponse = 2232, + GCHAccountTradeBanStatusChange = 2233, + GCHAccountLockStatusChange = 2234, + GCHVacVerificationChange = 2235, + GCHAccountPhoneNumberChange = 2236, + GCHAccountTwoFactorChange = 2237, + GCHInviteUserToLobby = 2238, + GCHUpdateMultipleSessions = 2239, + GCHMarkAppSessionsAuthoritative = 2240, + GCHRecurringSubscriptionStatusChange = 2241, + GCHAppCheersReceived = 2242, + GCHAppCheersGetAllowedTypes = 2243, + GCHAppCheersGetAllowedTypesResponse = 2244, + GCHRoutingRulesFromGCHtoGM = 2245, + GCHRoutingRulesToGCHfromGM = 2246, + UpdateCMMessageRateRules = 2247, + BaseP2P = 2500, + P2PIntroducerMessage = 2502, + BaseSM = 2900, + SMExpensiveReport = 2902, + SMHourlyReport = 2903, + SMFishingReport = 2904, + SMPartitionRenames = 2905, + SMMonitorSpace = 2906, + SMGetSchemaConversionResults = 2907, + SMTestNextBuildSchemaConversion = 2907, + SMGetSchemaConversionResultsResponse = 2908, + SMTestNextBuildSchemaConversionResponse = 2908, + BaseTest = 3000, + FailServer = 3000, + JobHeartbeatTest = 3001, + JobHeartbeatTestResponse = 3002, + BaseFTSRange = 3100, + FTSGetBrowseCounts = 3101, + FTSGetBrowseCountsResponse = 3102, + FTSBrowseClans = 3103, + FTSBrowseClansResponse = 3104, + FTSSearchClansByLocation = 3105, + FTSSearchClansByLocationResponse = 3106, + FTSSearchPlayersByLocation = 3107, + FTSSearchPlayersByLocationResponse = 3108, + FTSClanDeleted = 3109, + FTSSearch = 3110, + FTSSearchResponse = 3111, + FTSSearchStatus = 3112, + FTSSearchStatusResponse = 3113, + FTSGetGSPlayStats = 3114, + FTSGetGSPlayStatsResponse = 3115, + FTSGetGSPlayStatsForServer = 3116, + FTSGetGSPlayStatsForServerResponse = 3117, + FTSReportIPUpdates = 3118, + BaseCCSRange = 3150, + CCSGetComments = 3151, + CCSGetCommentsResponse = 3152, + CCSAddComment = 3153, + CCSAddCommentResponse = 3154, + CCSDeleteComment = 3155, + CCSDeleteCommentResponse = 3156, + CCSPreloadComments = 3157, + CCSNotifyCommentCount = 3158, + CCSGetCommentsForNews = 3159, + CCSGetCommentsForNewsResponse = 3160, + CCSDeleteAllCommentsByAuthor = 3161, + CCSDeleteAllCommentsByAuthorResponse = 3162, + BaseLBSRange = 3200, + LBSSetScore = 3201, + LBSSetScoreResponse = 3202, + LBSFindOrCreateLB = 3203, + LBSFindOrCreateLBResponse = 3204, + LBSGetLBEntries = 3205, + LBSGetLBEntriesResponse = 3206, + LBSGetLBList = 3207, + LBSGetLBListResponse = 3208, + LBSSetLBDetails = 3209, + LBSDeleteLB = 3210, + LBSDeleteLBEntry = 3211, + LBSResetLB = 3212, + LBSResetLBResponse = 3213, + LBSDeleteLBResponse = 3214, + BaseOGS = 3400, + OGSBeginSession = 3401, + OGSBeginSessionResponse = 3402, + OGSEndSession = 3403, + OGSEndSessionResponse = 3404, + OGSWriteAppSessionRow = 3406, + BaseBRP = 3600, + BRPStartShippingJobs = 3601, + BRPProcessUSBankReports = 3602, + BRPProcessGCReports = 3603, + BRPProcessPPReports = 3604, + BRPSettleNOVA = 3605, + BRPSettleCB = 3606, + BRPCommitGC = 3607, + BRPCommitGCResponse = 3608, + BRPFindHungTransactions = 3609, + BRPCheckFinanceCloseOutDate = 3610, + BRPProcessLicenses = 3611, + BRPProcessLicensesResponse = 3612, + BRPRemoveExpiredPaymentData = 3613, + BRPRemoveExpiredPaymentDataResponse = 3614, + BRPConvertToCurrentKeys = 3615, + BRPConvertToCurrentKeysResponse = 3616, + BRPPruneCardUsageStats = 3617, + BRPPruneCardUsageStatsResponse = 3618, + BRPCheckActivationCodes = 3619, + BRPCheckActivationCodesResponse = 3620, + BRPCommitWP = 3621, + BRPCommitWPResponse = 3622, + BRPProcessWPReports = 3623, + BRPProcessPaymentRules = 3624, + BRPProcessPartnerPayments = 3625, + BRPCheckSettlementReports = 3626, + BRPPostTaxToAvalara = 3628, + BRPPostTransactionTax = 3629, + BRPPostTransactionTaxResponse = 3630, + BRPProcessIMReports = 3631, + BaseAMRange2 = 4000, + AMCreateChat = 4001, + AMCreateChatResponse = 4002, + AMUpdateChatMetadata = 4003, + AMPublishChatMetadata = 4004, + AMSetProfileURL = 4005, + AMGetAccountEmailAddress = 4006, + AMGetAccountEmailAddressResponse = 4007, + AMRequestClanData = 4008, + AMRouteToClients = 4009, + AMLeaveClan = 4010, + AMClanPermissions = 4011, + AMClanPermissionsResponse = 4012, + AMCreateClanEvent = 4013, + AMCreateClanEventDummyForRateLimiting = 4013, + AMCreateClanEventResponse = 4014, + AMUpdateClanEvent = 4015, + AMUpdateClanEventDummyForRateLimiting = 4015, + AMUpdateClanEventResponse = 4016, + AMGetClanEvents = 4017, + AMGetClanEventsResponse = 4018, + AMDeleteClanEvent = 4019, + AMDeleteClanEventResponse = 4020, + AMSetClanPermissionSettings = 4021, + AMSetClanPermissionSettingsResponse = 4022, + AMGetClanPermissionSettings = 4023, + AMGetClanPermissionSettingsResponse = 4024, + AMPublishChatRoomInfo = 4025, + ClientChatRoomInfo = 4026, + AMCreateClanAnnouncement = 4027, + AMCreateClanAnnouncementResponse = 4028, + AMUpdateClanAnnouncement = 4029, + AMUpdateClanAnnouncementResponse = 4030, + AMGetClanAnnouncementsCount = 4031, + AMGetClanAnnouncementsCountResponse = 4032, + AMGetClanAnnouncements = 4033, + AMGetClanAnnouncementsResponse = 4034, + AMDeleteClanAnnouncement = 4035, + AMDeleteClanAnnouncementResponse = 4036, + AMGetSingleClanAnnouncement = 4037, + AMGetSingleClanAnnouncementResponse = 4038, + AMGetClanHistory = 4039, + AMGetClanHistoryResponse = 4040, + AMGetClanPermissionBits = 4041, + AMGetClanPermissionBitsResponse = 4042, + AMSetClanPermissionBits = 4043, + AMSetClanPermissionBitsResponse = 4044, + AMSessionInfoRequest = 4045, + AMSessionInfoResponse = 4046, + AMValidateWGToken = 4047, + AMGetSingleClanEvent = 4048, + AMGetSingleClanEventResponse = 4049, + AMGetClanRank = 4050, + AMGetClanRankResponse = 4051, + AMSetClanRank = 4052, + AMSetClanRankResponse = 4053, + AMGetClanPOTW = 4054, + AMGetClanPOTWResponse = 4055, + AMSetClanPOTW = 4056, + AMSetClanPOTWResponse = 4057, + AMRequestChatMetadata = 4058, + AMDumpUser = 4059, + AMKickUserFromClan = 4060, + AMAddFounderToClan = 4061, + AMValidateWGTokenResponse = 4062, + AMSetCommunityState = 4063, + AMSetAccountDetails = 4064, + AMGetChatBanList = 4065, + AMGetChatBanListResponse = 4066, + AMUnBanFromChat = 4067, + AMSetClanDetails = 4068, + AMGetAccountLinks = 4069, + AMGetAccountLinksResponse = 4070, + AMSetAccountLinks = 4071, + AMSetAccountLinksResponse = 4072, + AMGetUserGameStats = 4073, + UGSGetUserGameStats = 4073, + AMGetUserGameStatsResponse = 4074, + UGSGetUserGameStatsResponse = 4074, + AMCheckClanMembership = 4075, + AMGetClanMembers = 4076, + AMGetClanMembersResponse = 4077, + AMJoinPublicClan = 4078, + AMNotifyChatOfClanChange = 4079, + AMResubmitPurchase = 4080, + AMAddFriend = 4081, + AMAddFriendResponse = 4082, + AMRemoveFriend = 4083, + AMDumpClan = 4084, + AMChangeClanOwner = 4085, + AMCancelEasyCollect = 4086, + AMCancelEasyCollectResponse = 4087, + AMGetClanMembershipList = 4088, + AMGetClanMembershipListResponse = 4089, + AMClansInCommon = 4090, + AMClansInCommonResponse = 4091, + AMIsValidAccountID = 4092, + AMConvertClan = 4093, + AMGetGiftTargetListRelay = 4094, + AMWipeFriendsList = 4095, + AMSetIgnored = 4096, + AMClansInCommonCountResponse = 4097, + AMFriendsList = 4098, + AMFriendsListResponse = 4099, + AMFriendsInCommon = 4100, + AMFriendsInCommonResponse = 4101, + AMFriendsInCommonCountResponse = 4102, + AMClansInCommonCount = 4103, + AMChallengeVerdict = 4104, + AMChallengeNotification = 4105, + AMFindGSByIP = 4106, + AMFoundGSByIP = 4107, + AMGiftRevoked = 4108, + AMCreateAccountRecord = 4109, + AMUserClanList = 4110, + AMUserClanListResponse = 4111, + AMGetAccountDetails2 = 4112, + AMGetAccountDetailsResponse2 = 4113, + AMSetCommunityProfileSettings = 4114, + AMSetCommunityProfileSettingsResponse = 4115, + AMGetCommunityPrivacyState = 4116, + AMGetCommunityPrivacyStateResponse = 4117, + AMCheckClanInviteRateLimiting = 4118, + AMGetUserAchievementStatus = 4119, + UGSGetUserAchievementStatus = 4119, + AMGetIgnored = 4120, + AMGetIgnoredResponse = 4121, + AMSetIgnoredResponse = 4122, + AMSetFriendRelationshipNone = 4123, + AMGetFriendRelationship = 4124, + AMGetFriendRelationshipResponse = 4125, + AMServiceModulesCache = 4126, + AMServiceModulesCall = 4127, + AMServiceModulesCallResponse = 4128, + AMGetCaptchaDataForIP = 4129, + AMGetCaptchaDataForIPResponse = 4130, + AMValidateCaptchaDataForIP = 4131, + AMValidateCaptchaDataForIPResponse = 4132, + AMTrackFailedAuthByIP = 4133, + AMGetCaptchaDataByGID = 4134, + AMGetCaptchaDataByGIDResponse = 4135, + AMGetLobbyList = 4136, + AMGetLobbyListResponse = 4137, + AMGetLobbyMetadata = 4138, + AMGetLobbyMetadataResponse = 4139, + CommunityAddFriendNews = 4140, + AMAddClanNews = 4141, + AMWriteNews = 4142, + AMFindClanUser = 4143, + AMFindClanUserResponse = 4144, + AMBanFromChat = 4145, + AMGetUserHistoryResponse = 4146, + AMGetUserNewsSubscriptions = 4147, + AMGetUserNewsSubscriptionsResponse = 4148, + AMSetUserNewsSubscriptions = 4149, + AMGetUserNews = 4150, + AMGetUserNewsResponse = 4151, + AMSendQueuedEmails = 4152, + AMSetLicenseFlags = 4153, + AMGetUserHistory = 4154, + CommunityDeleteUserNews = 4155, + AMAllowUserFilesRequest = 4156, + AMAllowUserFilesResponse = 4157, + AMGetAccountStatus = 4158, + AMGetAccountStatusResponse = 4159, + AMEditBanReason = 4160, + AMCheckClanMembershipResponse = 4161, + AMProbeClanMembershipList = 4162, + AMProbeClanMembershipListResponse = 4163, + UGSGetUserAchievementStatusResponse = 4164, + AMGetFriendsLobbies = 4165, + AMGetFriendsLobbiesResponse = 4166, + AMGetUserFriendNewsResponse = 4172, + CommunityGetUserFriendNews = 4173, + AMGetUserClansNewsResponse = 4174, + AMGetUserClansNews = 4175, + AMStoreInitPurchase = 4176, + AMStoreInitPurchaseResponse = 4177, + AMStoreGetFinalPrice = 4178, + AMStoreGetFinalPriceResponse = 4179, + AMStoreCompletePurchase = 4180, + AMStoreCancelPurchase = 4181, + AMStorePurchaseResponse = 4182, + AMCreateAccountRecordInSteam3 = 4183, + AMGetPreviousCBAccount = 4184, + AMGetPreviousCBAccountResponse = 4185, + AMUpdateBillingAddress = 4186, + AMUpdateBillingAddressResponse = 4187, + AMGetBillingAddress = 4188, + AMGetBillingAddressResponse = 4189, + AMGetUserLicenseHistory = 4190, + AMGetUserLicenseHistoryResponse = 4191, + AMSupportChangePassword = 4194, + AMSupportChangeEmail = 4195, + AMSupportChangeSecretQA = 4196, + AMResetUserVerificationGSByIP = 4197, + AMUpdateGSPlayStats = 4198, + AMSupportEnableOrDisable = 4199, + AMGetComments = 4200, + AMGetCommentsResponse = 4201, + AMAddComment = 4202, + AMAddCommentResponse = 4203, + AMDeleteComment = 4204, + AMDeleteCommentResponse = 4205, + AMGetPurchaseStatus = 4206, + AMSupportIsAccountEnabled = 4209, + AMSupportIsAccountEnabledResponse = 4210, + AMGetUserStats = 4211, + UGSGetUserStats = 4211, + AMSupportKickSession = 4212, + AMGSSearch = 4213, + MarketingMessageUpdate = 4216, + AMRouteFriendMsg = 4219, + ChatServerRouteFriendMsg = 4219, + AMTicketAuthRequestOrResponse = 4220, + AMVerifyDepotManagementRights = 4222, + AMVerifyDepotManagementRightsResponse = 4223, + AMAddFreeLicense = 4224, + AMGetUserFriendsMinutesPlayed = 4225, + AMGetUserFriendsMinutesPlayedResponse = 4226, + AMGetUserMinutesPlayed = 4227, + AMGetUserMinutesPlayedResponse = 4228, + AMValidateEmailLink = 4231, + AMValidateEmailLinkResponse = 4232, + AMAddUsersToMarketingTreatment = 4234, + AMStoreUserStats = 4236, + UGSStoreUserStats = 4236, + AMGetUserGameplayInfo = 4237, + AMGetUserGameplayInfoResponse = 4238, + AMGetCardList = 4239, + AMGetCardListResponse = 4240, + AMDeleteStoredCard = 4241, + AMRevokeLegacyGameKeys = 4242, + AMGetWalletDetails = 4244, + AMGetWalletDetailsResponse = 4245, + AMDeleteStoredPaymentInfo = 4246, + AMGetStoredPaymentSummary = 4247, + AMGetStoredPaymentSummaryResponse = 4248, + AMGetWalletConversionRate = 4249, + AMGetWalletConversionRateResponse = 4250, + AMConvertWallet = 4251, + AMConvertWalletResponse = 4252, + AMRelayGetFriendsWhoPlayGame = 4253, + AMRelayGetFriendsWhoPlayGameResponse = 4254, + AMSetPreApproval = 4255, + AMSetPreApprovalResponse = 4256, + AMMarketingTreatmentUpdate = 4257, + AMCreateRefund = 4258, + AMCreateRefundResponse = 4259, + AMCreateChargeback = 4260, + AMCreateChargebackResponse = 4261, + AMCreateDispute = 4262, + AMCreateDisputeResponse = 4263, + AMClearDispute = 4264, + AMClearDisputeResponse = 4265, + AMCreateFinancialAdjustment = 4265, + AMPlayerNicknameList = 4266, + AMPlayerNicknameListResponse = 4267, + AMSetDRMTestConfig = 4268, + AMGetUserCurrentGameInfo = 4269, + AMGetUserCurrentGameInfoResponse = 4270, + AMGetGSPlayerList = 4271, + AMGetGSPlayerListResponse = 4272, + AMUpdatePersonaStateCache = 4275, + AMGetGameMembers = 4276, + AMGetGameMembersResponse = 4277, + AMGetSteamIDForMicroTxn = 4278, + AMGetSteamIDForMicroTxnResponse = 4279, + AMAddPublisherUser = 4280, + AMSetPartnerMember = 4280, + AMRemovePublisherUser = 4281, + AMGetUserLicenseList = 4282, + AMGetUserLicenseListResponse = 4283, + AMReloadGameGroupPolicy = 4284, + AMAddFreeLicenseResponse = 4285, + AMVACStatusUpdate = 4286, + AMGetAccountDetails = 4287, + AMGetAccountDetailsResponse = 4288, + AMGetPlayerLinkDetails = 4289, + AMGetPlayerLinkDetailsResponse = 4290, + AMSubscribeToPersonaFeed = 4291, + AMGetUserVacBanList = 4292, + AMGetUserVacBanListResponse = 4293, + AMGetAccountFlagsForWGSpoofing = 4294, + AMGetAccountFlagsForWGSpoofingResponse = 4295, + AMGetFriendsWishlistInfo = 4296, + AMGetFriendsWishlistInfoResponse = 4297, + AMGetClanOfficers = 4298, + AMGetClanOfficersResponse = 4299, + AMNameChange = 4300, + AMGetNameHistory = 4301, + AMGetNameHistoryResponse = 4302, + AMUpdateProviderStatus = 4305, + AMClearPersonaMetadataBlob = 4306, + AMSupportRemoveAccountSecurity = 4307, + AMIsAccountInCaptchaGracePeriod = 4308, + AMIsAccountInCaptchaGracePeriodResponse = 4309, + AMAccountPS3Unlink = 4310, + AMAccountPS3UnlinkResponse = 4311, + AMStoreUserStatsResponse = 4312, + UGSStoreUserStatsResponse = 4312, + AMGetAccountPSNInfo = 4313, + AMGetAccountPSNInfoResponse = 4314, + AMAuthenticatedPlayerList = 4315, + AMGetUserGifts = 4316, + AMGetUserGiftsResponse = 4317, + AMTransferLockedGifts = 4320, + AMTransferLockedGiftsResponse = 4321, + AMPlayerHostedOnGameServer = 4322, + AMGetAccountBanInfo = 4323, + AMGetAccountBanInfoResponse = 4324, + AMRecordBanEnforcement = 4325, + AMRollbackGiftTransfer = 4326, + AMRollbackGiftTransferResponse = 4327, + AMHandlePendingTransaction = 4328, + AMRequestClanDetails = 4329, + AMDeleteStoredPaypalAgreement = 4330, + AMGameServerUpdate = 4331, + AMGameServerRemove = 4332, + AMGetPaypalAgreements = 4333, + AMGetPaypalAgreementsResponse = 4334, + AMGameServerPlayerCompatibilityCheck = 4335, + AMGameServerPlayerCompatibilityCheckResponse = 4336, + AMRenewLicense = 4337, + AMGetAccountCommunityBanInfo = 4338, + AMGetAccountCommunityBanInfoResponse = 4339, + AMGameServerAccountChangePassword = 4340, + AMGameServerAccountDeleteAccount = 4341, + AMRenewAgreement = 4342, + AMSendEmail = 4343, + AMXsollaPayment = 4344, + AMXsollaPaymentResponse = 4345, + AMAcctAllowedToPurchase = 4346, + AMAcctAllowedToPurchaseResponse = 4347, + AMSwapKioskDeposit = 4348, + AMSwapKioskDepositResponse = 4349, + AMSetUserGiftUnowned = 4350, + AMSetUserGiftUnownedResponse = 4351, + AMClaimUnownedUserGift = 4352, + AMClaimUnownedUserGiftResponse = 4353, + AMSetClanName = 4354, + AMSetClanNameResponse = 4355, + AMGrantCoupon = 4356, + AMGrantCouponResponse = 4357, + AMIsPackageRestrictedInUserCountry = 4358, + AMIsPackageRestrictedInUserCountryResponse = 4359, + AMHandlePendingTransactionResponse = 4360, + AMGrantGuestPasses2 = 4361, + AMGrantGuestPasses2Response = 4362, + AMSessionQuery = 4363, + AMSessionQueryResponse = 4364, + AMGetPlayerBanDetails = 4365, + AMGetPlayerBanDetailsResponse = 4366, + AMFinalizePurchase = 4367, + AMFinalizePurchaseResponse = 4368, + AMPersonaChangeResponse = 4372, + AMGetClanDetailsForForumCreation = 4373, + AMGetClanDetailsForForumCreationResponse = 4374, + AMGetPendingNotificationCount = 4375, + AMGetPendingNotificationCountResponse = 4376, + AMPasswordHashUpgrade = 4377, + AMMoPayPayment = 4378, + AMMoPayPaymentResponse = 4379, + AMBoaCompraPayment = 4380, + AMBoaCompraPaymentResponse = 4381, + AMExpireCaptchaByGID = 4382, + AMCompleteExternalPurchase = 4383, + AMCompleteExternalPurchaseResponse = 4384, + AMResolveNegativeWalletCredits = 4385, + AMResolveNegativeWalletCreditsResponse = 4386, + AMPayelpPayment = 4387, + AMPayelpPaymentResponse = 4388, + AMPlayerGetClanBasicDetails = 4389, + AMPlayerGetClanBasicDetailsResponse = 4390, + AMMOLPayment = 4391, + AMMOLPaymentResponse = 4392, + GetUserIPCountry = 4393, + GetUserIPCountryResponse = 4394, + NotificationOfSuspiciousActivity = 4395, + AMDegicaPayment = 4396, + AMDegicaPaymentResponse = 4397, + AMEClubPayment = 4398, + AMEClubPaymentResponse = 4399, + AMPayPalPaymentsHubPayment = 4400, + AMPayPalPaymentsHubPaymentResponse = 4401, + AMTwoFactorRecoverAuthenticatorRequest = 4402, + AMTwoFactorRecoverAuthenticatorResponse = 4403, + AMSmart2PayPayment = 4404, + AMSmart2PayPaymentResponse = 4405, + AMValidatePasswordResetCodeAndSendSmsRequest = 4406, + AMValidatePasswordResetCodeAndSendSmsResponse = 4407, + AMGetAccountResetDetailsRequest = 4408, + AMGetAccountResetDetailsResponse = 4409, + AMBitPayPayment = 4410, + AMBitPayPaymentResponse = 4411, + AMSendAccountInfoUpdate = 4412, + AMSendScheduledGift = 4413, + AMNodwinPayment = 4414, + AMNodwinPaymentResponse = 4415, + AMResolveWalletRevoke = 4416, + AMResolveWalletReverseRevoke = 4417, + AMFundedPayment = 4418, + AMFundedPaymentResponse = 4419, + AMRequestPersonaUpdateForChatServer = 4420, + AMPerfectWorldPayment = 4421, + AMPerfectWorldPaymentResponse = 4422, + AMECommPayPayment = 4423, + AMECommPayPaymentResponse = 4424, + AMSetRemoteClientID = 4425, + BasePSRange = 5000, + PSCreateShoppingCart = 5001, + PSCreateShoppingCartResponse = 5002, + PSIsValidShoppingCart = 5003, + PSIsValidShoppingCartResponse = 5004, + PSAddPackageToShoppingCart = 5005, + PSAddPackageToShoppingCartResponse = 5006, + PSRemoveLineItemFromShoppingCart = 5007, + PSRemoveLineItemFromShoppingCartResponse = 5008, + PSGetShoppingCartContents = 5009, + PSGetShoppingCartContentsResponse = 5010, + PSAddWalletCreditToShoppingCart = 5011, + PSAddWalletCreditToShoppingCartResponse = 5012, + BaseUFSRange = 5200, + ClientUFSUploadFileRequest = 5202, + ClientUFSUploadFileResponse = 5203, + ClientUFSUploadFileChunk = 5204, + ClientUFSUploadFileFinished = 5205, + ClientUFSGetFileListForApp = 5206, + ClientUFSGetFileListForAppResponse = 5207, + ClientUFSDownloadRequest = 5210, + ClientUFSDownloadResponse = 5211, + ClientUFSDownloadChunk = 5212, + ClientUFSLoginRequest = 5213, + ClientUFSLoginResponse = 5214, + UFSReloadPartitionInfo = 5215, + ClientUFSTransferHeartbeat = 5216, + UFSSynchronizeFile = 5217, + UFSSynchronizeFileResponse = 5218, + ClientUFSDeleteFileRequest = 5219, + ClientUFSDeleteFileResponse = 5220, + UFSDownloadRequest = 5221, + UFSDownloadResponse = 5222, + UFSDownloadChunk = 5223, + ClientUFSGetUGCDetails = 5226, + ClientUFSGetUGCDetailsResponse = 5227, + UFSUpdateFileFlags = 5228, + UFSUpdateFileFlagsResponse = 5229, + ClientUFSGetSingleFileInfo = 5230, + ClientUFSGetSingleFileInfoResponse = 5231, + ClientUFSShareFile = 5232, + ClientUFSShareFileResponse = 5233, + UFSReloadAccount = 5234, + UFSReloadAccountResponse = 5235, + UFSUpdateRecordBatched = 5236, + UFSUpdateRecordBatchedResponse = 5237, + UFSMigrateFile = 5238, + UFSMigrateFileResponse = 5239, + UFSGetUGCURLs = 5240, + UFSGetUGCURLsResponse = 5241, + UFSHttpUploadFileFinishRequest = 5242, + UFSHttpUploadFileFinishResponse = 5243, + UFSDownloadStartRequest = 5244, + UFSDownloadStartResponse = 5245, + UFSDownloadChunkRequest = 5246, + UFSDownloadChunkResponse = 5247, + UFSDownloadFinishRequest = 5248, + UFSDownloadFinishResponse = 5249, + UFSFlushURLCache = 5250, + UFSUploadCommit = 5251, + ClientUFSUploadCommit = 5251, + UFSUploadCommitResponse = 5252, + ClientUFSUploadCommitResponse = 5252, + UFSMigrateFileAppID = 5253, + UFSMigrateFileAppIDResponse = 5254, + BaseClient2 = 5400, + ClientRequestForgottenPasswordEmail = 5401, + ClientRequestForgottenPasswordEmailResponse = 5402, + ClientCreateAccountResponse = 5403, + ClientResetForgottenPassword = 5404, + ClientResetForgottenPasswordResponse = 5405, + ClientCreateAccount2 = 5406, + ClientInformOfResetForgottenPassword = 5407, + ClientInformOfResetForgottenPasswordResponse = 5408, + ClientAnonUserLogOn_Deprecated = 5409, + ClientGamesPlayedWithDataBlob = 5410, + ClientUpdateUserGameInfo = 5411, + ClientFileToDownload = 5412, + ClientFileToDownloadResponse = 5413, + ClientLBSSetScore = 5414, + ClientLBSSetScoreResponse = 5415, + ClientLBSFindOrCreateLB = 5416, + ClientLBSFindOrCreateLBResponse = 5417, + ClientLBSGetLBEntries = 5418, + ClientLBSGetLBEntriesResponse = 5419, + ClientMarketingMessageUpdate = 5420, + ClientChatDeclined = 5426, + ClientFriendMsgIncoming = 5427, + ClientAuthList_Deprecated = 5428, + ClientTicketAuthComplete = 5429, + ClientIsLimitedAccount = 5430, + ClientRequestAuthList = 5431, + ClientAuthList = 5432, + ClientStat = 5433, + ClientP2PConnectionInfo = 5434, + ClientP2PConnectionFailInfo = 5435, + ClientGetNumberOfCurrentPlayers = 5436, + ClientGetNumberOfCurrentPlayersResponse = 5437, + ClientGetDepotDecryptionKey = 5438, + ClientGetDepotDecryptionKeyResponse = 5439, + GSPerformHardwareSurvey = 5440, + ClientGetAppBetaPasswords = 5441, + ClientGetAppBetaPasswordsResponse = 5442, + ClientEnableTestLicense = 5443, + ClientEnableTestLicenseResponse = 5444, + ClientDisableTestLicense = 5445, + ClientDisableTestLicenseResponse = 5446, + ClientRequestValidationMail = 5448, + ClientRequestValidationMailResponse = 5449, + ClientCheckAppBetaPassword = 5450, + ClientCheckAppBetaPasswordResponse = 5451, + ClientToGC = 5452, + ClientFromGC = 5453, + ClientRequestChangeMail = 5454, + ClientRequestChangeMailResponse = 5455, + ClientEmailAddrInfo = 5456, + ClientPasswordChange3 = 5457, + ClientEmailChange3 = 5458, + ClientPersonalQAChange3 = 5459, + ClientResetForgottenPassword3 = 5460, + ClientRequestForgottenPasswordEmail3 = 5461, + ClientCreateAccount3 = 5462, + ClientNewLoginKey = 5463, + ClientNewLoginKeyAccepted = 5464, + ClientLogOnWithHash_Deprecated = 5465, + ClientStoreUserStats2 = 5466, + ClientStatsUpdated = 5467, + ClientActivateOEMLicense = 5468, + ClientRegisterOEMMachine = 5469, + ClientRegisterOEMMachineResponse = 5470, + ClientRequestedClientStats = 5480, + ClientStat2Int32 = 5481, + ClientStat2 = 5482, + ClientVerifyPassword = 5483, + ClientVerifyPasswordResponse = 5484, + ClientDRMDownloadRequest = 5485, + ClientDRMDownloadResponse = 5486, + ClientDRMFinalResult = 5487, + ClientGetFriendsWhoPlayGame = 5488, + ClientGetFriendsWhoPlayGameResponse = 5489, + ClientOGSBeginSession = 5490, + ClientOGSBeginSessionResponse = 5491, + ClientOGSEndSession = 5492, + ClientOGSEndSessionResponse = 5493, + ClientOGSWriteRow = 5494, + ClientDRMTest = 5495, + ClientDRMTestResult = 5496, + ClientStartPeerContentServer = 5497, + ClientStartPeerContentServerResponse = 5498, + ClientServerUnavailable = 5500, + ClientServersAvailable = 5501, + ClientRegisterAuthTicketWithCM = 5502, + ClientGCMsgFailed = 5503, + ClientMicroTxnAuthRequest = 5504, + ClientMicroTxnAuthorize = 5505, + ClientMicroTxnAuthorizeResponse = 5506, + ClientAppMinutesPlayedData = 5507, + ClientGetMicroTxnInfo = 5508, + ClientGetMicroTxnInfoResponse = 5509, + ClientMarketingMessageUpdate2 = 5510, + ClientDeregisterWithServer = 5511, + ClientSubscribeToPersonaFeed = 5512, + ClientLogon = 5514, + ClientGetClientDetails = 5515, + ClientGetClientDetailsResponse = 5516, + ClientReportOverlayDetourFailure = 5517, + ClientGetClientAppList = 5518, + ClientGetClientAppListResponse = 5519, + ClientInstallClientApp = 5520, + ClientInstallClientAppResponse = 5521, + ClientUninstallClientApp = 5522, + ClientUninstallClientAppResponse = 5523, + ClientSetClientAppUpdateState = 5524, + ClientSetClientAppUpdateStateResponse = 5525, + ClientRequestEncryptedAppTicket = 5526, + ClientRequestEncryptedAppTicketResponse = 5527, + ClientWalletInfoUpdate = 5528, + ClientLBSSetUGC = 5529, + ClientLBSSetUGCResponse = 5530, + ClientAMGetClanOfficers = 5531, + ClientAMGetClanOfficersResponse = 5532, + ClientCheckFileSignature = 5533, + ClientCheckFileSignatureResponse = 5534, + ClientFriendProfileInfo = 5535, + ClientFriendProfileInfoResponse = 5536, + ClientUpdateMachineAuth = 5537, + ClientUpdateMachineAuthResponse = 5538, + ClientReadMachineAuth = 5539, + ClientReadMachineAuthResponse = 5540, + ClientRequestMachineAuth = 5541, + ClientRequestMachineAuthResponse = 5542, + ClientScreenshotsChanged = 5543, + ClientEmailChange4 = 5544, + ClientEmailChangeResponse4 = 5545, + ClientGetCDNAuthToken = 5546, + ClientGetCDNAuthTokenResponse = 5547, + ClientDownloadRateStatistics = 5548, + ClientRequestAccountData = 5549, + ClientRequestAccountDataResponse = 5550, + ClientResetForgottenPassword4 = 5551, + ClientHideFriend = 5552, + ClientFriendsGroupsList = 5553, + ClientGetClanActivityCounts = 5554, + ClientGetClanActivityCountsResponse = 5555, + ClientOGSReportString = 5556, + ClientOGSReportBug = 5557, + ClientSentLogs = 5558, + ClientLogonGameServer = 5559, + AMClientCreateFriendsGroup = 5560, + AMClientCreateFriendsGroupResponse = 5561, + AMClientDeleteFriendsGroup = 5562, + AMClientDeleteFriendsGroupResponse = 5563, + AMClientRenameFriendsGroup = 5564, + AMClientManageFriendsGroup = 5564, + AMClientRenameFriendsGroupResponse = 5565, + AMClientManageFriendsGroupResponse = 5565, + AMClientAddFriendToGroup = 5566, + AMClientAddFriendToGroupResponse = 5567, + AMClientRemoveFriendFromGroup = 5568, + AMClientRemoveFriendFromGroupResponse = 5569, + ClientAMGetPersonaNameHistory = 5570, + ClientAMGetPersonaNameHistoryResponse = 5571, + ClientRequestFreeLicense = 5572, + ClientRequestFreeLicenseResponse = 5573, + ClientDRMDownloadRequestWithCrashData = 5574, + ClientAuthListAck = 5575, + ClientItemAnnouncements = 5576, + ClientRequestItemAnnouncements = 5577, + ClientFriendMsgEchoToSender = 5578, + ClientChangeSteamGuardOptions = 5579, + ClientChangeSteamGuardOptionsResponse = 5580, + ClientOGSGameServerPingSample = 5581, + ClientCommentNotifications = 5582, + ClientRequestCommentNotifications = 5583, + ClientPersonaChangeResponse = 5584, + ClientRequestWebAPIAuthenticateUserNonce = 5585, + ClientRequestWebAPIAuthenticateUserNonceResponse = 5586, + ClientPlayerNicknameList = 5587, + AMClientSetPlayerNickname = 5588, + AMClientSetPlayerNicknameResponse = 5589, + ClientCreateAccountProto = 5590, + ClientRequestOAuthTokenForApp = 5590, + ClientCreateAccountProtoResponse = 5591, + ClientRequestOAuthTokenForAppResponse = 5591, + ClientGetNumberOfCurrentPlayersDP = 5592, + ClientGetNumberOfCurrentPlayersDPResponse = 5593, + ClientServiceMethod = 5594, + ClientServiceMethodLegacy = 5594, + ClientServiceMethodResponse = 5595, + ClientServiceMethodLegacyResponse = 5595, + ClientFriendUserStatusPublished = 5596, + ClientCurrentUIMode = 5597, + ClientVanityURLChangedNotification = 5598, + ClientUserNotifications = 5599, + BaseDFS = 5600, + DFSGetFile = 5601, + DFSInstallLocalFile = 5602, + DFSConnection = 5603, + DFSConnectionReply = 5604, + ClientDFSAuthenticateRequest = 5605, + ClientDFSAuthenticateResponse = 5606, + ClientDFSEndSession = 5607, + DFSPurgeFile = 5608, + DFSRouteFile = 5609, + DFSGetFileFromServer = 5610, + DFSAcceptedResponse = 5611, + DFSRequestPingback = 5612, + DFSRecvTransmitFile = 5613, + DFSSendTransmitFile = 5614, + DFSRequestPingback2 = 5615, + DFSResponsePingback2 = 5616, + ClientDFSDownloadStatus = 5617, + DFSStartTransfer = 5618, + DFSTransferComplete = 5619, + DFSRouteFileResponse = 5620, + ClientNetworkingCertRequest = 5621, + ClientNetworkingCertRequestResponse = 5622, + ClientChallengeRequest = 5623, + ClientChallengeResponse = 5624, + BadgeCraftedNotification = 5625, + ClientNetworkingMobileCertRequest = 5626, + ClientNetworkingMobileCertRequestResponse = 5627, + BaseMDS = 5800, + ClientMDSLoginRequest = 5801, + ClientMDSLoginResponse = 5802, + ClientMDSUploadManifestRequest = 5803, + ClientMDSUploadManifestResponse = 5804, + ClientMDSTransmitManifestDataChunk = 5805, + ClientMDSHeartbeat = 5806, + ClientMDSUploadDepotChunks = 5807, + ClientMDSUploadDepotChunksResponse = 5808, + ClientMDSInitDepotBuildRequest = 5809, + ClientMDSInitDepotBuildResponse = 5810, + AMToMDSGetDepotDecryptionKey = 5812, + MDSToAMGetDepotDecryptionKeyResponse = 5813, + MDSGetVersionsForDepot = 5814, + MDSGetVersionsForDepotResponse = 5815, + ClientMDSInitWorkshopBuildRequest = 5816, + MDSSetPublicVersionForDepot = 5816, + ClientMDSInitWorkshopBuildResponse = 5817, + MDSSetPublicVersionForDepotResponse = 5817, + ClientMDSGetDepotManifest = 5818, + ClientMDSGetDepotManifestResponse = 5819, + ClientMDSGetDepotManifestChunk = 5820, + ClientMDSUploadRateTest = 5823, + ClientMDSUploadRateTestResponse = 5824, + MDSDownloadDepotChunksAck = 5825, + MDSContentServerStatsBroadcast = 5826, + MDSContentServerConfigRequest = 5827, + MDSContentServerConfig = 5828, + MDSGetDepotManifest = 5829, + MDSGetDepotManifestResponse = 5830, + MDSGetDepotManifestChunk = 5831, + MDSGetDepotChunk = 5832, + MDSGetDepotChunkResponse = 5833, + MDSGetDepotChunkChunk = 5834, + MDSUpdateContentServerConfig = 5835, + MDSGetServerListForUser = 5836, + MDSGetServerListForUserResponse = 5837, + ClientMDSRegisterAppBuild = 5838, + ClientMDSRegisterAppBuildResponse = 5839, + ClientMDSSetAppBuildLive = 5840, + ClientMDSSetAppBuildLiveResponse = 5841, + ClientMDSGetPrevDepotBuild = 5842, + ClientMDSGetPrevDepotBuildResponse = 5843, + MDSToCSFlushChunk = 5844, + ClientMDSSignInstallScript = 5845, + ClientMDSSignInstallScriptResponse = 5846, + MDSMigrateChunk = 5847, + MDSMigrateChunkResponse = 5848, + MDSToCSFlushManifest = 5849, + CSBase = 6200, + CSPing = 6201, + CSPingResponse = 6202, + GMSBase = 6400, + GMSGameServerReplicate = 6401, + ClientGMSServerQuery = 6403, + GMSClientServerQueryResponse = 6404, + AMGMSGameServerUpdate = 6405, + AMGMSGameServerRemove = 6406, + GameServerOutOfDate = 6407, + DeviceAuthorizationBase = 6500, + ClientAuthorizeLocalDeviceRequest = 6501, + ClientAuthorizeLocalDevice = 6502, + ClientAuthorizeLocalDeviceResponse = 6502, + ClientDeauthorizeDeviceRequest = 6503, + ClientDeauthorizeDevice = 6504, + ClientUseLocalDeviceAuthorizations = 6505, + ClientGetAuthorizedDevices = 6506, + ClientGetAuthorizedDevicesResponse = 6507, + AMNotifySessionDeviceAuthorized = 6508, + ClientAuthorizeLocalDeviceNotification = 6509, + MMSBase = 6600, + ClientMMSCreateLobby = 6601, + ClientMMSCreateLobbyResponse = 6602, + ClientMMSJoinLobby = 6603, + ClientMMSJoinLobbyResponse = 6604, + ClientMMSLeaveLobby = 6605, + ClientMMSLeaveLobbyResponse = 6606, + ClientMMSGetLobbyList = 6607, + ClientMMSGetLobbyListResponse = 6608, + ClientMMSSetLobbyData = 6609, + ClientMMSSetLobbyDataResponse = 6610, + ClientMMSGetLobbyData = 6611, + ClientMMSLobbyData = 6612, + ClientMMSSendLobbyChatMsg = 6613, + ClientMMSLobbyChatMsg = 6614, + ClientMMSSetLobbyOwner = 6615, + ClientMMSSetLobbyOwnerResponse = 6616, + ClientMMSSetLobbyGameServer = 6617, + ClientMMSLobbyGameServerSet = 6618, + ClientMMSUserJoinedLobby = 6619, + ClientMMSUserLeftLobby = 6620, + ClientMMSInviteToLobby = 6621, + ClientMMSFlushFrenemyListCache = 6622, + ClientMMSFlushFrenemyListCacheResponse = 6623, + ClientMMSSetLobbyLinked = 6624, + ClientMMSSetRatelimitPolicyOnClient = 6625, + ClientMMSGetLobbyStatus = 6626, + ClientMMSGetLobbyStatusResponse = 6627, + MMSGetLobbyList = 6628, + MMSGetLobbyListResponse = 6629, + NonStdMsgBase = 6800, + NonStdMsgMemcached = 6801, + NonStdMsgHTTPServer = 6802, + NonStdMsgHTTPClient = 6803, + NonStdMsgWGResponse = 6804, + NonStdMsgPHPSimulator = 6805, + NonStdMsgChase = 6806, + NonStdMsgDFSTransfer = 6807, + NonStdMsgTests = 6808, + NonStdMsgUMQpipeAAPL = 6809, + NonStdMsgSyslog = 6810, + NonStdMsgLogsink = 6811, + NonStdMsgSteam2Emulator = 6812, + NonStdMsgRTMPServer = 6813, + NonStdMsgWebSocket = 6814, + NonStdMsgRedis = 6815, + UDSBase = 7000, + ClientUDSP2PSessionStarted = 7001, + ClientUDSP2PSessionEnded = 7002, + UDSRenderUserAuth = 7003, + UDSRenderUserAuthResponse = 7004, + ClientUDSInviteToGame = 7005, + ClientInviteToGame = 7005, + UDSFindSession = 7006, + UDSHasSession = 7006, + UDSFindSessionResponse = 7007, + UDSHasSessionResponse = 7007, + MPASBase = 7100, + MPASVacBanReset = 7101, + KGSBase = 7200, + KGSAllocateKeyRange = 7201, + KGSAllocateKeyRangeResponse = 7202, + KGSGenerateKeys = 7203, + KGSGenerateKeysResponse = 7204, + KGSRemapKeys = 7205, + KGSRemapKeysResponse = 7206, + KGSGenerateGameStopWCKeys = 7207, + KGSGenerateGameStopWCKeysResponse = 7208, + UCMBase = 7300, + ClientUCMAddScreenshot = 7301, + ClientUCMAddScreenshotResponse = 7302, + UCMValidateObjectExists = 7303, + UCMValidateObjectExistsResponse = 7304, + UCMResetCommunityContent = 7307, + UCMResetCommunityContentResponse = 7308, + ClientUCMDeleteScreenshot = 7309, + ClientUCMDeleteScreenshotResponse = 7310, + ClientUCMPublishFile = 7311, + ClientUCMPublishFileResponse = 7312, + ClientUCMGetPublishedFileDetails = 7313, + ClientUCMGetPublishedFileDetailsResponse = 7314, + ClientUCMDeletePublishedFile = 7315, + ClientUCMDeletePublishedFileResponse = 7316, + ClientUCMEnumerateUserPublishedFiles = 7317, + ClientUCMEnumerateUserPublishedFilesResponse = 7318, + ClientUCMSubscribePublishedFile = 7319, + ClientUCMSubscribePublishedFileResponse = 7320, + ClientUCMEnumerateUserSubscribedFiles = 7321, + ClientUCMEnumerateUserSubscribedFilesResponse = 7322, + ClientUCMUnsubscribePublishedFile = 7323, + ClientUCMUnsubscribePublishedFileResponse = 7324, + ClientUCMUpdatePublishedFile = 7325, + ClientUCMUpdatePublishedFileResponse = 7326, + UCMUpdatePublishedFile = 7327, + UCMUpdatePublishedFileResponse = 7328, + UCMDeletePublishedFile = 7329, + UCMDeletePublishedFileResponse = 7330, + UCMUpdatePublishedFileStat = 7331, + UCMUpdatePublishedFileBan = 7332, + UCMUpdatePublishedFileBanResponse = 7333, + UCMUpdateTaggedScreenshot = 7334, + UCMAddTaggedScreenshot = 7335, + UCMRemoveTaggedScreenshot = 7336, + UCMReloadPublishedFile = 7337, + UCMReloadUserFileListCaches = 7338, + UCMPublishedFileReported = 7339, + UCMUpdatePublishedFileIncompatibleStatus = 7340, + UCMPublishedFilePreviewAdd = 7341, + UCMPublishedFilePreviewAddResponse = 7342, + UCMPublishedFilePreviewRemove = 7343, + UCMPublishedFilePreviewRemoveResponse = 7344, + UCMPublishedFilePreviewChangeSortOrder = 7345, + UCMPublishedFilePreviewChangeSortOrderResponse = 7346, + ClientUCMPublishedFileSubscribed = 7347, + ClientUCMPublishedFileUnsubscribed = 7348, + UCMPublishedFileSubscribed = 7349, + UCMPublishedFileUnsubscribed = 7350, + UCMPublishFile = 7351, + UCMPublishFileResponse = 7352, + UCMPublishedFileChildAdd = 7353, + UCMPublishedFileChildAddResponse = 7354, + UCMPublishedFileChildRemove = 7355, + UCMPublishedFileChildRemoveResponse = 7356, + UCMPublishedFileChildChangeSortOrder = 7357, + UCMPublishedFileChildChangeSortOrderResponse = 7358, + UCMPublishedFileParentChanged = 7359, + ClientUCMGetPublishedFilesForUser = 7360, + ClientUCMGetPublishedFilesForUserResponse = 7361, + UCMGetPublishedFilesForUser = 7362, + UCMGetPublishedFilesForUserResponse = 7363, + ClientUCMSetUserPublishedFileAction = 7364, + ClientUCMSetUserPublishedFileActionResponse = 7365, + ClientUCMEnumeratePublishedFilesByUserAction = 7366, + ClientUCMEnumeratePublishedFilesByUserActionResponse = 7367, + ClientUCMPublishedFileDeleted = 7368, + UCMGetUserSubscribedFiles = 7369, + UCMGetUserSubscribedFilesResponse = 7370, + UCMFixStatsPublishedFile = 7371, + UCMDeleteOldScreenshot = 7372, + UCMDeleteOldScreenshotResponse = 7373, + UCMDeleteOldVideo = 7374, + UCMDeleteOldVideoResponse = 7375, + UCMUpdateOldScreenshotPrivacy = 7376, + UCMUpdateOldScreenshotPrivacyResponse = 7377, + ClientUCMEnumerateUserSubscribedFilesWithUpdates = 7378, + ClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse = 7379, + UCMPublishedFileContentUpdated = 7380, + UCMPublishedFileUpdated = 7381, + ClientUCMPublishedFileUpdated = 7381, + ClientWorkshopItemChangesRequest = 7382, + ClientWorkshopItemChangesResponse = 7383, + ClientWorkshopItemInfoRequest = 7384, + ClientWorkshopItemInfoResponse = 7385, + FSBase = 7500, + ClientRichPresenceUpload = 7501, + ClientRichPresenceRequest = 7502, + ClientRichPresenceInfo = 7503, + FSRichPresenceRequest = 7504, + FSRichPresenceResponse = 7505, + FSComputeFrenematrix = 7506, + FSComputeFrenematrixResponse = 7507, + FSPlayStatusNotification = 7508, + FSPublishPersonaStatus = 7509, + FSAddOrRemoveFollower = 7510, + FSAddOrRemoveFollowerResponse = 7511, + FSUpdateFollowingList = 7512, + FSCommentNotification = 7513, + FSCommentNotificationViewed = 7514, + ClientFSGetFollowerCount = 7515, + ClientFSGetFollowerCountResponse = 7516, + ClientFSGetIsFollowing = 7517, + ClientFSGetIsFollowingResponse = 7518, + ClientFSEnumerateFollowingList = 7519, + ClientFSEnumerateFollowingListResponse = 7520, + FSGetPendingNotificationCount = 7521, + FSGetPendingNotificationCountResponse = 7522, + ClientFSOfflineMessageNotification = 7523, + ClientChatOfflineMessageNotification = 7523, + ClientFSRequestOfflineMessageCount = 7524, + ClientChatRequestOfflineMessageCount = 7524, + ClientFSGetFriendMessageHistory = 7525, + ClientChatGetFriendMessageHistory = 7525, + ClientFSGetFriendMessageHistoryResponse = 7526, + ClientChatGetFriendMessageHistoryResponse = 7526, + ClientFSGetFriendMessageHistoryForOfflineMessages = 7527, + ClientChatGetFriendMessageHistoryForOfflineMessages = 7527, + ClientFSGetFriendsSteamLevels = 7528, + ClientFSGetFriendsSteamLevelsResponse = 7529, + AMRequestFriendData = 7530, + FSRequestFriendData = 7530, + CEGVersionSetEnableDisableRequest = 7600, + DRMRange2 = 7600, + CEGVersionSetEnableDisableResponse = 7601, + CEGPropStatusDRMSRequest = 7602, + CEGPropStatusDRMSResponse = 7603, + CEGWhackFailureReportRequest = 7604, + CEGWhackFailureReportResponse = 7605, + DRMSFetchVersionSet = 7606, + DRMSFetchVersionSetResponse = 7607, + EconBase = 7700, + EconTrading_InitiateTradeRequest = 7701, + EconTrading_InitiateTradeProposed = 7702, + EconTrading_InitiateTradeResponse = 7703, + EconTrading_InitiateTradeResult = 7704, + EconTrading_StartSession = 7705, + EconTrading_CancelTradeRequest = 7706, + EconFlushInventoryCache = 7707, + EconFlushInventoryCacheResponse = 7708, + EconCDKeyProcessTransaction = 7711, + EconCDKeyProcessTransactionResponse = 7712, + EconGetErrorLogs = 7713, + EconGetErrorLogsResponse = 7714, + RMRange = 7800, + RMTestVerisignOTP = 7800, + RMTestVerisignOTPResponse = 7801, + RMDeleteMemcachedKeys = 7803, + RMRemoteInvoke = 7804, + BadLoginIPList = 7805, + RMMsgTraceAddTrigger = 7806, + RMMsgTraceRemoveTrigger = 7807, + RMMsgTraceEvent = 7808, + UGSBase = 7900, + UGSUpdateGlobalStats = 7900, + ClientUGSGetGlobalStats = 7901, + ClientUGSGetGlobalStatsResponse = 7902, + StoreUpdateRecommendationCount = 8000, + StoreBase = 8000, + UMQBase = 8100, + UMQLogonRequest = 8100, + UMQLogonResponse = 8101, + UMQLogoffRequest = 8102, + UMQLogoffResponse = 8103, + UMQSendChatMessage = 8104, + UMQIncomingChatMessage = 8105, + UMQPoll = 8106, + UMQPollResults = 8107, + UMQ2AM_ClientMsgBatch = 8108, + UMQEnqueueMobileSalePromotions = 8109, + UMQEnqueueMobileAnnouncements = 8110, + WorkshopAcceptTOSRequest = 8200, + WorkshopBase = 8200, + WorkshopAcceptTOSResponse = 8201, + WebAPIBase = 8300, + WebAPIValidateOAuth2Token = 8300, + WebAPIValidateOAuth2TokenResponse = 8301, + WebAPIInvalidateTokensForAccount = 8302, + WebAPIRegisterGCInterfaces = 8303, + WebAPIInvalidateOAuthClientCache = 8304, + WebAPIInvalidateOAuthTokenCache = 8305, + WebAPISetSecrets = 8306, + BackpackBase = 8400, + BackpackAddToCurrency = 8401, + BackpackAddToCurrencyResponse = 8402, + CREBase = 8500, + CRERankByTrend = 8501, + CRERankByTrendResponse = 8502, + CREItemVoteSummary = 8503, + CREItemVoteSummaryResponse = 8504, + CRERankByVote = 8505, + CRERankByVoteResponse = 8506, + CREUpdateUserPublishedItemVote = 8507, + CREUpdateUserPublishedItemVoteResponse = 8508, + CREGetUserPublishedItemVoteDetails = 8509, + CREGetUserPublishedItemVoteDetailsResponse = 8510, + CREEnumeratePublishedFiles = 8511, + CREEnumeratePublishedFilesResponse = 8512, + CREPublishedFileVoteAdded = 8513, + SecretsBase = 8600, + SecretsRequestCredentialPair = 8600, + SecretsCredentialPairResponse = 8601, + SecretsRequestServerIdentity = 8602, + SecretsServerIdentityResponse = 8603, + SecretsUpdateServerIdentities = 8604, + BoxMonitorBase = 8700, + BoxMonitorReportRequest = 8700, + BoxMonitorReportResponse = 8701, + LogsinkBase = 8800, + LogsinkWriteReport = 8800, + PICSBase = 8900, + ClientPICSChangesSinceRequest = 8901, + ClientPICSChangesSinceResponse = 8902, + ClientPICSProductInfoRequest = 8903, + ClientPICSProductInfoResponse = 8904, + ClientPICSAccessTokenRequest = 8905, + ClientPICSAccessTokenResponse = 8906, + WorkerProcess = 9000, + WorkerProcessPingRequest = 9000, + WorkerProcessPingResponse = 9001, + WorkerProcessShutdown = 9002, + DRMWorkerProcess = 9100, + DRMWorkerProcessDRMAndSign = 9100, + DRMWorkerProcessDRMAndSignResponse = 9101, + DRMWorkerProcessSteamworksInfoRequest = 9102, + DRMWorkerProcessSteamworksInfoResponse = 9103, + DRMWorkerProcessInstallDRMDLLRequest = 9104, + DRMWorkerProcessInstallDRMDLLResponse = 9105, + DRMWorkerProcessSecretIdStringRequest = 9106, + DRMWorkerProcessSecretIdStringResponse = 9107, + DRMWorkerProcessGetDRMGuidsFromFileRequest = 9108, + DRMWorkerProcessGetDRMGuidsFromFileResponse = 9109, + DRMWorkerProcessInstallProcessedFilesRequest = 9110, + DRMWorkerProcessInstallProcessedFilesResponse = 9111, + DRMWorkerProcessExamineBlobRequest = 9112, + DRMWorkerProcessExamineBlobResponse = 9113, + DRMWorkerProcessDescribeSecretRequest = 9114, + DRMWorkerProcessDescribeSecretResponse = 9115, + DRMWorkerProcessBackfillOriginalRequest = 9116, + DRMWorkerProcessBackfillOriginalResponse = 9117, + DRMWorkerProcessValidateDRMDLLRequest = 9118, + DRMWorkerProcessValidateDRMDLLResponse = 9119, + DRMWorkerProcessValidateFileRequest = 9120, + DRMWorkerProcessValidateFileResponse = 9121, + DRMWorkerProcessSplitAndInstallRequest = 9122, + DRMWorkerProcessSplitAndInstallResponse = 9123, + DRMWorkerProcessGetBlobRequest = 9124, + DRMWorkerProcessGetBlobResponse = 9125, + DRMWorkerProcessEvaluateCrashRequest = 9126, + DRMWorkerProcessEvaluateCrashResponse = 9127, + DRMWorkerProcessAnalyzeFileRequest = 9128, + DRMWorkerProcessAnalyzeFileResponse = 9129, + DRMWorkerProcessUnpackBlobRequest = 9130, + DRMWorkerProcessUnpackBlobResponse = 9131, + DRMWorkerProcessInstallAllRequest = 9132, + DRMWorkerProcessInstallAllResponse = 9133, + TestWorkerProcess = 9200, + TestWorkerProcessLoadUnloadModuleRequest = 9200, + TestWorkerProcessLoadUnloadModuleResponse = 9201, + TestWorkerProcessServiceModuleCallRequest = 9202, + TestWorkerProcessServiceModuleCallResponse = 9203, + QuestServerBase = 9300, + ClientGetEmoticonList = 9330, + ClientEmoticonList = 9331, + ClientSharedLibraryBase = 9400, + SLCBase = 9400, + SLCUserSessionStatus = 9400, + SLCRequestUserSessionStatus = 9401, + SLCSharedLicensesLockStatus = 9402, + ClientSharedLicensesLockStatus = 9403, + ClientSharedLicensesStopPlaying = 9404, + ClientSharedLibraryLockStatus = 9405, + ClientSharedLibraryStopPlaying = 9406, + SLCOwnerLibraryChanged = 9407, + SLCSharedLibraryChanged = 9408, + RemoteClientAuth = 9500, + RemoteClientBase = 9500, + RemoteClientAuthResponse = 9501, + RemoteClientAppStatus = 9502, + RemoteClientStartStream = 9503, + RemoteClientStartStreamResponse = 9504, + RemoteClientPing = 9505, + RemoteClientPingResponse = 9506, + ClientUnlockStreaming = 9507, + ClientUnlockStreamingResponse = 9508, + RemoteClientAcceptEULA = 9509, + RemoteClientGetControllerConfig = 9510, + RemoteClientGetControllerConfigResposne = 9511, + RemoteClientGetControllerConfigResponse = 9511, + RemoteClientStreamingEnabled = 9512, + ClientUnlockHEVC = 9513, + ClientUnlockHEVCResponse = 9514, + RemoteClientStatusRequest = 9515, + RemoteClientStatusResponse = 9516, + ClientConcurrentSessionsBase = 9600, + ClientPlayingSessionState = 9600, + ClientKickPlayingSession = 9601, + ClientBroadcastBase = 9700, + ClientBroadcastInit = 9700, + ClientBroadcastFrames = 9701, + ClientBroadcastDisconnect = 9702, + ClientBroadcastScreenshot = 9703, + ClientBroadcastUploadConfig = 9704, + BaseClient3 = 9800, + ClientVoiceCallPreAuthorize = 9800, + ClientVoiceCallPreAuthorizeResponse = 9801, + ClientServerTimestampRequest = 9802, + ClientServerTimestampResponse = 9803, + ServiceMethodCallFromClientNonAuthed = 9804, + ClientHello = 9805, + ClientEnableOrDisableDownloads = 9806, + ClientEnableOrDisableDownloadsResponse = 9807, + ClientLANP2PBase = 9900, + ClientLANP2PRequestChunk = 9900, + ClientLANP2PRequestChunkResponse = 9901, + ClientPeerChunkRequest = 9902, + ClientPeerChunkResponse = 9903, + ClientLANP2PMax = 9999, + NotifyWatchdog = 10000, + BaseWatchdogServer = 10000, + ClientSiteLicenseBase = 10100, + ClientSiteLicenseSiteInfoNotification = 10100, + ClientSiteLicenseCheckout = 10101, + ClientSiteLicenseCheckoutResponse = 10102, + ClientSiteLicenseGetAvailableSeats = 10103, + ClientSiteLicenseGetAvailableSeatsResponse = 10104, + ClientSiteLicenseGetContentCacheInfo = 10105, + ClientSiteLicenseGetContentCacheInfoResponse = 10106, + BaseChatServer = 12000, + ChatServerGetPendingNotificationCount = 12000, + ChatServerGetPendingNotificationCountResponse = 12001, + BaseSecretServer = 12100, + ServerSecretChanged = 12100, +}; + +namespace proto +{ + #define PROTOBUF_PTR(T,D) \ + class T { \ + C##T* p; \ + public: \ + T(const MBinBuffer &buf) : p((C##T*)protobuf_c_message_unpack(&D, 0, buf.length(), buf.data())) {} \ + T(const ProtobufCBinaryData &data) : p((C##T*)protobuf_c_message_unpack(&D, 0, data.len, data.data)) {} \ + T(const uint8_t *pData, size_t len) : p((C##T*)protobuf_c_message_unpack(&D, 0, len, pData)) {} \ + ~T() { protobuf_c_message_free_unpacked(p,0); } \ + C##T* operator->() const { return p; } \ + operator C##T*() const { return p; } \ + }; + + PROTOBUF_PTR(MsgMulti, cmsg_multi__descriptor); + PROTOBUF_PTR(MsgProtoBufHeader, cmsg_proto_buf_header__descriptor); + PROTOBUF_PTR(MsgClientLogonResponse, cmsg_client_logon_response__descriptor); + PROTOBUF_PTR(AuthenticationGetPasswordRSAPublicKeyResponse, cauthentication__get_password_rsapublic_key__response__descriptor); + PROTOBUF_PTR(AuthenticationBeginAuthSessionViaCredentialsResponse, cauthentication__begin_auth_session_via_credentials__response__descriptor); + PROTOBUF_PTR(AuthenticationPollAuthSessionStatusResponse, cauthentication__poll_auth_session_status__response__descriptor); +}; diff --git a/protocols/Steam/src/protobuf-c/protobuf-c.h b/protocols/Steam/src/protobuf-c/protobuf-c.h index 23b38fecd3..3b66e20629 100644 --- a/protocols/Steam/src/protobuf-c/protobuf-c.h +++ b/protocols/Steam/src/protobuf-c/protobuf-c.h @@ -1108,6 +1108,8 @@ protobuf_c_service_invoke_internal( PROTOBUF_C__END_DECLS #ifdef __cplusplus +#ifndef BASE_PROTOBUF_CLASS +#define BASE_PROTOBUF_CLASS extern "C" void message_init_generic(const ProtobufCMessageDescriptor * desc, ProtobufCMessage * message); struct ProtobufCppMessage : public ProtobufCMessage @@ -1117,6 +1119,7 @@ struct ProtobufCppMessage : public ProtobufCMessage message_init_generic(&descr, this); } }; -#endif +#endif // BASE_PROTOBUF_CLASS +#endif // __cplusplus #endif /* PROTOBUF_C_H */ diff --git a/protocols/Steam/src/stdafx.h b/protocols/Steam/src/stdafx.h index 4931099ca4..c25e13d337 100644 --- a/protocols/Steam/src/stdafx.h +++ b/protocols/Steam/src/stdafx.h @@ -39,10 +39,9 @@ #include "resource.h"
#include "version.h"
-#include "protobuf-c/protobuf-c.h"
-
#include "protobuf-c/steammessages_auth.steamclient.pb-c.h"
#include "protobuf-c/steammessages_clientserver_login.pb-c.h"
+#include "proto.h"
#define MODULE "Steam"
#define DB_KEY_LASTMSGTS "LastMessageTS"
@@ -74,14 +73,11 @@ extern HANDLE hExtraXStatus; #include "steam_proto.h"
#include "api/app_info.h"
-#include "api/authorization.h"
-#include "api/authorization.h"
#include "api/avatar.h"
#include "api/captcha.h"
#include "api/friend.h"
#include "api/friend_list.h"
#include "api/history.h"
-#include "api/login.h"
#include "api/message.h"
#include "api/pending.h"
#include "api/rsa_key.h"
diff --git a/protocols/Steam/src/steam_avatars.cpp b/protocols/Steam/src/steam_avatars.cpp index 5a895b6a0c..2a7de109ca 100644 --- a/protocols/Steam/src/steam_avatars.cpp +++ b/protocols/Steam/src/steam_avatars.cpp @@ -2,7 +2,7 @@ wchar_t* CSteamProto::GetAvatarFilePath(MCONTACT hContact)
{
- ptrA steamId(getStringA(hContact, "SteamID"));
+ ptrA steamId(getStringA(hContact, DBKEY_STEAM_ID));
if (steamId == NULL)
return nullptr;
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index 33764d2f82..378ab1933d 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -65,7 +65,7 @@ MCONTACT CSteamProto::GetContactFromAuthEvent(MEVENT hEvent) MCONTACT CSteamProto::GetContact(const char *steamId) { for (auto &hContact : AccContacts()) { - ptrA cSteamId(getStringA(hContact, "SteamID")); + ptrA cSteamId(getStringA(hContact, DBKEY_STEAM_ID)); if (!mir_strcmp(cSteamId, steamId)) return hContact; } @@ -293,7 +293,7 @@ void CSteamProto::ContactIsAskingAuth(MCONTACT hContact) return; // create auth request event - ptrA steamId(getUStringA(hContact, "SteamID")); + ptrA steamId(getUStringA(hContact, DBKEY_STEAM_ID)); SendRequest(new GetUserSummariesRequest(this, steamId), &CSteamProto::OnGotUserSummaries); ptrA nickName(getUStringA(hContact, "Nick")); @@ -332,7 +332,7 @@ MCONTACT CSteamProto::AddContact(const char *steamId, const wchar_t *nick, bool hContact = db_add_contact(); Proto_AddToContact(hContact, m_szModuleName); - setString(hContact, "SteamID", steamId); + setString(hContact, DBKEY_STEAM_ID, steamId); if (mir_wstrlen(nick)) { setWString(hContact, "Nick", nick); db_set_ws(hContact, "CList", "MyHandle", nick); @@ -386,7 +386,7 @@ void CSteamProto::OnGotFriendList(const JSONNode &root, void *) return; // Comma-separated list of steam ids to update summaries - std::string steamIds = (char *)ptrA(getStringA("SteamID")); + std::string steamIds = (char *)ptrA(getStringA(DBKEY_STEAM_ID)); // Remember contacts on server std::map<json_string, const JSONNode*> friendsMap; @@ -402,7 +402,7 @@ void CSteamProto::OnGotFriendList(const JSONNode &root, void *) // Check and update contacts in database for (auto &hContact : AccContacts()) { - ptrA steamId(getStringA(hContact, "SteamID")); + ptrA steamId(getStringA(hContact, DBKEY_STEAM_ID)); if (steamId == nullptr) continue; @@ -481,7 +481,7 @@ void CSteamProto::OnGotAvatar(const HttpResponse &response, void *arg) GetDbAvatarInfo(ai); if (!response.IsSuccess()) { - ptrA steamId(getStringA(ai.hContact, "SteamID")); + ptrA steamId(getStringA(ai.hContact, DBKEY_STEAM_ID)); debugLogA(__FUNCTION__ ": failed to get avatar %s", steamId.get()); if (ai.hContact) @@ -507,7 +507,7 @@ void CSteamProto::OnFriendAdded(const HttpResponse &response, void *arg) if (!response.IsSuccess() || mir_strcmp(response.data(), "true")) { - ptrW steamId(getWStringA(param->hContact, "SteamID")); + ptrW steamId(getWStringA(param->hContact, DBKEY_STEAM_ID)); ptrW who(getWStringA(param->hContact, "Nick")); if (!who) who = mir_wstrdup(steamId); diff --git a/protocols/Steam/src/steam_history.cpp b/protocols/Steam/src/steam_history.cpp index cb2725f31a..eb5df8d8c1 100644 --- a/protocols/Steam/src/steam_history.cpp +++ b/protocols/Steam/src/steam_history.cpp @@ -22,7 +22,7 @@ void CSteamProto::OnGotConversations(const JSONNode &root, void *) time_t lastMessageTS = _wtoi64(session["last_message"].as_mstring()); if (lastMessageTS > storedMessageTS) { ptrA token(getStringA("TokenSecret")); - ptrA steamId(getStringA("SteamID")); + ptrA steamId(getStringA(DBKEY_STEAM_ID)); SendRequest(new GetHistoryMessagesRequest(token, steamId, who, storedMessageTS), &CSteamProto::OnGotHistoryMessages, (void*)hContact); } } diff --git a/protocols/Steam/src/steam_login.cpp b/protocols/Steam/src/steam_login.cpp index 44b419a5f6..6bf3bfb89e 100644 --- a/protocols/Steam/src/steam_login.cpp +++ b/protocols/Steam/src/steam_login.cpp @@ -1,138 +1,6 @@ #include "stdafx.h" -bool CSteamProto::IsOnline() -{ - return m_iStatus > ID_STATUS_OFFLINE && m_hServerConn != nullptr; -} - -bool CSteamProto::IsMe(const char *steamId) -{ - ptrA mySteamId(getStringA("SteamID")); - return mir_strcmp(steamId, mySteamId) == 0; -} - -void CSteamProto::Login() -{ - CMsgClientHello hello; - hello.protocol_version = STEAM_PROTOCOL_VERSION; hello.has_protocol_version = true; - WSSend(EMsg::ClientHello, hello); - - ptrA token(getStringA("TokenSecret")); - ptrA sessionId(getStringA("SessionID")); - if (mir_strlen(token) > 0 && mir_strlen(sessionId) > 0) { - SendRequest(new LogonRequest(token), &CSteamProto::OnLoggedOn); - return; - } - - T2Utf username(getWStringA("Username")); - if (username == NULL) - LoginFailed(); - else { - CAuthenticationGetPasswordRSAPublicKeyRequest request; - request.account_name = username.get(); - WSSendService("Authentication.GetPasswordRSAPublicKey#1", request); - } -} - -void CSteamProto::LoginFailed() -{ - m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE; - ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_FAILED, (HANDLE)m_iStatus, m_iStatus); -} - -void CSteamProto::Logout() -{ - ptrA token(getStringA("TokenSecret")); - if (mir_strlen(token) > 0) { - ptrA umqid(getStringA("UMQID")); - SendRequest(new LogoffRequest(token, umqid)); - } - - ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)m_iStatus, m_iStatus); -} - -void CSteamProto::OnGotHosts(const JSONNode &root, void*) -{ - db_delete_module(0, STEAM_MODULE); - - int i = 0; - CMStringA szSetting; - for (auto &it : root["response"]["serverlist_websockets"]) { - szSetting.Format("Host%d", i++); - db_set_ws(0, STEAM_MODULE, szSetting, it.as_mstring()); - } - - db_set_dw(0, STEAM_MODULE, DBKEY_HOSTS_COUNT, i); - db_set_dw(0, STEAM_MODULE, DBKEY_HOSTS_DATE, time(0)); -} - -void CSteamProto::OnGotRsaKey(const JSONNode &root, void *) -{ - if (root.isnull()) { - SetStatus(ID_STATUS_OFFLINE); - return; - } - - if (!root["success"].as_bool()) { - SetStatus(ID_STATUS_OFFLINE); - return; - } - - // load rsa key parts - json_string modulus = root["publickey_mod"].as_string(); - json_string exp = root["publickey_exp"].as_string(); - DWORD exponent = strtoul(exp.c_str(), nullptr, 16); // default "010001" = 0x10001 - - json_string timestamp = root["timestamp"].as_string(); - - // encrcrypt password - ptrA base64RsaEncryptedPassword; - ptrA szPassword(getStringA("Password")); - - DWORD error = 0; - DWORD encryptedSize = 0; - if ((error = RsaEncrypt(modulus.c_str(), exponent, szPassword, nullptr, encryptedSize)) != 0) { - debugLogA(__FUNCTION__ ": encryption error (%lu)", error); - SetStatus(ID_STATUS_OFFLINE); - return; - } - - uint8_t *encryptedPassword = (uint8_t *)mir_calloc(encryptedSize); - if ((error = RsaEncrypt(modulus.c_str(), exponent, szPassword, encryptedPassword, encryptedSize)) != 0) { - debugLogA(__FUNCTION__ ": encryption error (%lu)", error); - SetStatus(ID_STATUS_OFFLINE); - return; - } - - base64RsaEncryptedPassword = mir_base64_encode(encryptedPassword, encryptedSize); - mir_free(encryptedPassword); - - // run authorization request - T2Utf username(getWStringA("Username")); - - ptrA twoFactorCode(getStringA("TwoFactorCode")); - if (!twoFactorCode) - twoFactorCode = mir_strdup(""); - - ptrA guardId(getStringA("GuardId")); - if (!guardId) - guardId = mir_strdup(""); - ptrA guardCode(getStringA("GuardCode")); - if (!guardCode) - guardCode = mir_strdup(""); - - ptrA captchaId(getStringA("CaptchaId")); - if (!captchaId) - captchaId = mir_strdup("-1"); - ptrA captchaText(getStringA("CaptchaText")); - if (!captchaText) - captchaText = mir_strdup(""); - - SendRequest( - new AuthorizationRequest(username, base64RsaEncryptedPassword, timestamp.c_str(), twoFactorCode, guardCode, guardId, captchaId, captchaText), - &CSteamProto::OnAuthorization); -} - +/* void CSteamProto::OnGotCaptcha(const HttpResponse &response, void *arg) { ptrA captchaId((char *)arg); @@ -142,7 +10,7 @@ void CSteamProto::OnGotCaptcha(const HttpResponse &response, void *arg) return; } - CSteamCaptchaDialog captchaDialog(this, (const uint8_t*)response.data(), response.length()); + CSteamCaptchaDialog captchaDialog(this, (const uint8_t *)response.data(), response.length()); if (!captchaDialog.DoModal()) { DeleteAuthSettings(); SetStatus(ID_STATUS_OFFLINE); @@ -152,38 +20,8 @@ void CSteamProto::OnGotCaptcha(const HttpResponse &response, void *arg) setString("CaptchaId", captchaId); setString("CaptchaText", captchaDialog.GetCaptchaText()); - T2Utf username(getWStringA("Username")); - SendRequest(new GetRsaKeyRequest(username), &CSteamProto::OnGotRsaKey); -} - -void CSteamProto::OnAuthorization(const HttpResponse &response, void *) -{ - if (!response) { - SetStatus(ID_STATUS_OFFLINE); - return; - } - - JSONNode root = JSONNode::parse(response.data()); - if (root.isnull()) { - SetStatus(ID_STATUS_OFFLINE); - return; - } - - if (!root["success"].as_bool()) { - OnAuthorizationError(root); - return; - } - - OnAuthorizationSuccess(root); -} - -void CSteamProto::DeleteAuthSettings() -{ - delSetting("TwoFactorCode"); - delSetting("GuardId"); - delSetting("GuardCode"); - delSetting("CaptchaId"); - delSetting("CaptchaText"); + ptrA username(getUStringA("Username")); + // SendRequest(new GetRsaKeyRequest(username), &CSteamProto::OnGotRsaKey); } void CSteamProto::OnAuthorizationError(const JSONNode &root) @@ -222,7 +60,7 @@ void CSteamProto::OnAuthorizationError(const JSONNode &root) setString("TwoFactorCode", twoFactorDialog.GetTwoFactorCode()); - SendRequest(new GetRsaKeyRequest(username), &CSteamProto::OnGotRsaKey); + // SendRequest(new GetRsaKeyRequest(username), &CSteamProto::OnGotRsaKey); } if (root["emailauth_needed"].as_bool()) { @@ -254,7 +92,7 @@ void CSteamProto::OnAuthorizationError(const JSONNode &root) setString("GuardId", guardId.c_str()); setString("GuardCode", guardDialog.GetGuardCode()); - SendRequest(new GetRsaKeyRequest(username), &CSteamProto::OnGotRsaKey); + // SendRequest(new GetRsaKeyRequest(username), &CSteamProto::OnGotRsaKey); return; } @@ -272,134 +110,222 @@ void CSteamProto::OnAuthorizationError(const JSONNode &root) SetStatus(ID_STATUS_OFFLINE); ShowNotification(message); } +*/ -void CSteamProto::OnAuthorizationSuccess(const JSONNode &root) +void CSteamProto::DeleteAuthSettings() { - DeleteAuthSettings(); + delSetting("TwoFactorCode"); + delSetting("GuardId"); + delSetting("GuardCode"); + delSetting("CaptchaId"); + delSetting("CaptchaText"); +} - if (!root["login_complete"].as_bool()) { - SetStatus(ID_STATUS_OFFLINE); +bool CSteamProto::IsOnline() +{ + return m_iStatus > ID_STATUS_OFFLINE && m_hServerConn != nullptr; +} + +bool CSteamProto::IsMe(const char *steamId) +{ + ptrA mySteamId(getStringA(DBKEY_STEAM_ID)); + return mir_strcmp(steamId, mySteamId) == 0; +} + +void CSteamProto::Login() +{ + CMsgClientHello hello; + hello.protocol_version = STEAM_PROTOCOL_VERSION; hello.has_protocol_version = true; + WSSend(EMsg::ClientHello, hello); + + ptrA token(getStringA("TokenSecret")); + ptrA sessionId(getStringA("SessionID")); + if (mir_strlen(token) > 0 && mir_strlen(sessionId) > 0) { + // SendRequest(new LogonRequest(token), &CSteamProto::OnLoggedOn); return; } - json_string oauth = root["oauth"].as_string(); - JSONNode node = JSONNode::parse(oauth.c_str()); - if (node.isnull()) { - SetStatus(ID_STATUS_OFFLINE); - return; + ptrA username(getUStringA("Username")); + if (username == NULL) + LoginFailed(); + else { + CAuthenticationGetPasswordRSAPublicKeyRequest request; + request.account_name = username.get(); + WSSendService("Authentication.GetPasswordRSAPublicKey#1", request, &CSteamProto::OnGotRsaKey); } +} - json_string steamId = node["steamid"].as_string(); - setString("SteamID", steamId.c_str()); +void CSteamProto::LoginFailed() +{ + m_bTerminated = true; - json_string token = node["oauth_token"].as_string(); - setString("TokenSecret", token.c_str()); + m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE; + ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)m_iStatus, m_iStatus); +} - SendRequest(new GetSessionRequest2(token.c_str(), steamId.c_str()), &CSteamProto::OnGotSession); +void CSteamProto::Logout() +{ + m_bTerminated = true; - SendRequest(new LogonRequest(token.c_str()), &CSteamProto::OnLoggedOn); + ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)m_iStatus, m_iStatus); } -void CSteamProto::OnGotSession(const HttpResponse &response, void *) +void CSteamProto::OnGotHosts(const JSONNode &root, void*) { - if (!response) { - debugLogA(__FUNCTION__ ": failed to get session id"); - return; - } - - for (auto &header : response.Headers()) { - if (mir_strcmpi(header->szName, "Set-Cookie")) - continue; + db_delete_module(0, STEAM_MODULE); - std::string cookies = header->szValue; - size_t start = cookies.find("sessionid=") + 10; - size_t end = cookies.substr(start).find(';'); - std::string sessionId = cookies.substr(start, end - start + 10); - setString("SessionID", sessionId.c_str()); - break; + int i = 0; + CMStringA szSetting; + for (auto &it : root["response"]["serverlist_websockets"]) { + szSetting.Format("Host%d", i++); + db_set_ws(0, STEAM_MODULE, szSetting, it.as_mstring()); } + + db_set_dw(0, STEAM_MODULE, DBKEY_HOSTS_COUNT, i); + db_set_dw(0, STEAM_MODULE, DBKEY_HOSTS_DATE, time(0)); } -void CSteamProto::HandleTokenExpired() +void CSteamProto::OnGotRsaKey(const uint8_t *buf, size_t cbLen) { - // Delete expired token - delSetting("TokenSecret"); - - // Try to relogin automatically (but only once) - if (isLoginAgain) { - // Notify error to user - debugLogA(__FUNCTION__ ": cannot obtain connection token"); - ShowNotification(TranslateT("Cannot obtain connection token.")); - // Just go offline; it also resets the isLoginAgain to false - SetStatus(ID_STATUS_OFFLINE); + proto::AuthenticationGetPasswordRSAPublicKeyResponse reply(buf, cbLen); + if (reply == nullptr || !reply->publickey_exp || !reply->publickey_mod) { + LoginFailed(); return; } - // Remember we are trying to relogin - isLoginAgain = true; + // load rsa key parts + DWORD exponent = strtoul(reply->publickey_exp, nullptr, 16); // default "010001" = 0x10001 - Login(); -} + // encrypt password + ptrA szPassword(getStringA("Password")); -void CSteamProto::OnLoggedOn(const HttpResponse &response, void *) -{ - if (response.GetStatusCode() == HTTP_CODE_UNAUTHORIZED) { - // Probably expired TokenSecret + DWORD error = 0; + DWORD encryptedSize = 0; + if ((error = RsaEncrypt(reply->publickey_mod, exponent, szPassword, nullptr, encryptedSize)) != 0) { + debugLogA(__FUNCTION__ ": encryption error (%lu)", error); SetStatus(ID_STATUS_OFFLINE); - HandleTokenExpired(); return; } - if (!response.IsSuccess()) { - // Probably timeout or no connection, we can do nothing here - debugLogA(__FUNCTION__ ": unknown login error"); + uint8_t *encryptedPassword = (uint8_t *)mir_calloc(encryptedSize); + if ((error = RsaEncrypt(reply->publickey_mod, exponent, szPassword, encryptedPassword, encryptedSize)) != 0) { + debugLogA(__FUNCTION__ ": encryption error (%lu)", error); SetStatus(ID_STATUS_OFFLINE); return; } - JSONNode root = JSONNode::parse(response.data()); - json_string error = root["error"].as_string(); - if (error != "OK") { - // Probably expired TokenSecret - HandleTokenExpired(); + ptrA base64RsaEncryptedPassword(mir_base64_encode(encryptedPassword, encryptedSize)); + mir_free(encryptedPassword); + + // run authorization request + ptrA userName(getUStringA("Username")); + ptrA deviceName(getUStringA("DeviceName")); + + CAuthenticationDeviceDetails details; + details.device_friendly_name = deviceName.get(); + details.os_type = 1; details.has_os_type = true; + details.platform_type = EAUTH_TOKEN_PLATFORM_TYPE__k_EAuthTokenPlatformType_SteamClient; details.has_platform_type = true; + + CAuthenticationBeginAuthSessionViaCredentialsRequest request; + request.account_name = userName.get(); + request.device_friendly_name = deviceName.get(); + request.encrypted_password = base64RsaEncryptedPassword; + request.encryption_timestamp = reply->timestamp; request.has_encryption_timestamp = true; + request.persistence = ESESSION_PERSISTENCE__k_ESessionPersistence_Ephemeral; request.has_persistence = true; + request.platform_type = EAUTH_TOKEN_PLATFORM_TYPE__k_EAuthTokenPlatformType_SteamClient; request.has_platform_type = true; + request.remember_login = 0; request.has_remember_login = true; + request.device_details = &details; + + WSSendService("Authentication.BeginAuthSessionViaCredentials#1", request, &CSteamProto::OnAuthorization); +} + +void CSteamProto::OnAuthorization(const uint8_t *buf, size_t cbLen) +{ + proto::AuthenticationBeginAuthSessionViaCredentialsResponse reply(buf, cbLen); + if (reply == nullptr) { + LoginFailed(); return; } - json_string umqId = root["umqid"].as_string(); - setString("UMQID", umqId.c_str()); + // Success + if (reply->has_client_id && reply->has_steamid) { + DeleteAuthSettings(); + SetId(DBKEY_STEAM_ID, reply->steamid); + SetId(DBKEY_CLIENT_ID, reply->client_id); - long messageId = root["umqid"].as_int(); - setDword("MessageID", messageId); + CAuthenticationPollAuthSessionStatusRequest request; + request.client_id = reply->client_id; request.has_client_id = true; + request.request_id = reply->request_id; request.has_request_id = true; + WSSendService("Authentication.PollAuthSessionStatus#1", request, &CSteamProto::OnPollSession); + } + else { + debugLogA("Something went wrong: %s", reply->extended_error_message); + LoginFailed(); + } +} - // load contact list - ptrA token(getStringA("TokenSecret")); - ptrA steamId(getStringA("SteamID")); +void CSteamProto::OnPollSession(const uint8_t *buf, size_t cbLen) +{ + proto::AuthenticationPollAuthSessionStatusResponse reply(buf, cbLen); + if (reply == nullptr || !reply->access_token || !reply->refresh_token) { + LoginFailed(); + return; + } - SendRequest(new GetSessionRequest2(token, steamId), &CSteamProto::OnGotSession); + m_szAccessToken = reply->access_token; + m_szRefreshToken = reply->refresh_token; - // send this request immediately, so we can start polling thread with already loaded all contacts - SendRequest(new GetFriendListRequest(token, steamId, "friend,ignoredfriend,requestrecipient"), &CSteamProto::OnGotFriendList); + ptrA szAccountName(getUStringA(DBKEY_ACCOUNT_NAME)); + + MBinBuffer machineId(getBlob(DBKEY_MACHINE_ID)); + if (!machineId.length()) { + uint8_t random[100], hashOut[20]; + Utils_GetRandom(random, sizeof(random)); + mir_sha1_hash(random, sizeof(random), hashOut); - // go to online now - ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)ID_STATUS_CONNECTING, m_iStatus = m_iDesiredStatus); + db_set_blob(0, m_szModuleName, DBKEY_MACHINE_ID, hashOut, sizeof(hashOut)); + machineId.append(hashOut, sizeof(hashOut)); + } + + CMsgIPAddress privateIp; + privateIp.ip_case = CMSG_IPADDRESS__IP_V4; + privateIp.v4 = 0; + + CMsgClientLogon request; + request.access_token = reply->access_token; + request.account_name = szAccountName.get(); + request.client_language = "english"; + request.client_os_type = 16; request.has_client_os_type = true; + request.should_remember_password = false; request.has_should_remember_password = true; + request.obfuscated_private_ip = &privateIp; + request.protocol_version = STEAM_PROTOCOL_VERSION; request.has_protocol_version = true; + request.supports_rate_limit_response = request.has_supports_rate_limit_response = true; + request.machine_name = ""; + request.steamguard_dont_remember_computer = false; request.has_steamguard_dont_remember_computer = true; + request.chat_mode = 2; request.has_chat_mode = true; + request.cell_id = 7; request.has_cell_id = true; + request.machine_id.data = machineId.data(); + request.machine_id.len = machineId.length(); + WSSend(EMsg::ClientLogon, request); } -void CSteamProto::OnReLogin(const JSONNode &root, void*) +void CSteamProto::OnLoggedOn(const uint8_t *buf, size_t cbLen) { - if (root.isnull()) { - SetStatus(ID_STATUS_OFFLINE); + proto::MsgClientLogonResponse reply(buf, cbLen); + if (reply == nullptr || !reply->has_eresult) { + LoginFailed(); return; } - json_string error = root["error"].as_string(); - if (error != "OK") { - SetStatus(ID_STATUS_OFFLINE); + if (reply->eresult != 1) { + debugLogA("Login failed with error %d", reply->eresult); + LoginFailed(); return; } - json_string umqId = root["umqid"].as_string(); - setString("UMQID", umqId.c_str()); + // go to online now + ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)ID_STATUS_CONNECTING, m_iStatus = m_iDesiredStatus); - long messageId = root["message"].as_int(); - setDword("MessageID", messageId); + // load contact list + // SendRequest(new GetFriendListRequest(token, steamId, "friend,ignoredfriend,requestrecipient"), &CSteamProto::OnGotFriendList); } diff --git a/protocols/Steam/src/steam_menus.cpp b/protocols/Steam/src/steam_menus.cpp index b1be43879c..6ed3f211fa 100644 --- a/protocols/Steam/src/steam_menus.cpp +++ b/protocols/Steam/src/steam_menus.cpp @@ -20,8 +20,8 @@ INT_PTR CSteamProto::AuthRevokeCommand(WPARAM hContact, LPARAM) {
ptrA token(getStringA("TokenSecret"));
ptrA sessionId(getStringA("SessionID"));
- ptrA steamId(getStringA("SteamID"));
- char *who = getStringA(hContact, "SteamID");
+ ptrA steamId(getStringA(DBKEY_STEAM_ID));
+ char *who = getStringA(hContact, DBKEY_STEAM_ID);
SendRequest(new RemoveFriendRequest(token, sessionId, steamId, who), &CSteamProto::OnFriendRemoved, who);
return 0;
}
@@ -30,8 +30,8 @@ int CSteamProto::BlockCommand(WPARAM hContact, LPARAM) {
ptrA token(getStringA("TokenSecret"));
ptrA sessionId(getStringA("SessionID"));
- ptrA steamId(getStringA("SteamID"));
- char *who = getStringA(hContact, "SteamID");
+ ptrA steamId(getStringA(DBKEY_STEAM_ID));
+ char *who = getStringA(hContact, DBKEY_STEAM_ID);
SendRequest(new BlockFriendRequest(token, sessionId, steamId, who), &CSteamProto::OnFriendBlocked, who);
return 0;
}
@@ -40,8 +40,8 @@ int CSteamProto::UnblockCommand(WPARAM hContact, LPARAM) {
ptrA token(getStringA("TokenSecret"));
ptrA sessionId(getStringA("SessionID"));
- ptrA steamId(getStringA("SteamID"));
- char *who = getStringA(hContact, "SteamID");
+ ptrA steamId(getStringA(DBKEY_STEAM_ID));
+ char *who = getStringA(hContact, DBKEY_STEAM_ID);
SendRequest(new UnblockFriendRequest(token, sessionId, steamId, who), &CSteamProto::OnFriendUnblocked, who);
return 0;
}
@@ -58,7 +58,7 @@ int CSteamProto::JoinToGameCommand(WPARAM hContact, LPARAM) INT_PTR CSteamProto::OpenBlockListCommand(WPARAM, LPARAM)
{
ptrA token(getStringA("TokenSecret"));
- ptrA steamId(getStringA("SteamID"));
+ ptrA steamId(getStringA(DBKEY_STEAM_ID));
SendRequest(new GetFriendListRequest(token, steamId, "ignoredfriend"), &CSteamProto::OnGotBlockList);
return 0;
}
diff --git a/protocols/Steam/src/steam_messages.cpp b/protocols/Steam/src/steam_messages.cpp index 11870d341b..42c70d6471 100644 --- a/protocols/Steam/src/steam_messages.cpp +++ b/protocols/Steam/src/steam_messages.cpp @@ -16,7 +16,7 @@ int CSteamProto::OnSendMessage(MCONTACT hContact, const char *message) ptrA token(getStringA("TokenSecret"));
ptrA umqid(getStringA("UMQID"));
- ptrA steamId(getStringA(hContact, "SteamID"));
+ ptrA steamId(getStringA(hContact, DBKEY_STEAM_ID));
SendRequest(new SendMessageRequest(token, umqid, steamId, message), &CSteamProto::OnMessageSent, param);
return hMessage;
}
@@ -26,7 +26,7 @@ void CSteamProto::OnMessageSent(const HttpResponse &response, void *arg) SendMessageParam *param = (SendMessageParam *)arg;
std::string error = Translate("Unknown error");
- ptrW steamId(getWStringA(param->hContact, "SteamID"));
+ ptrW steamId(getWStringA(param->hContact, DBKEY_STEAM_ID));
time_t timestamp = NULL;
if (response) {
@@ -79,7 +79,7 @@ int CSteamProto::UserIsTyping(MCONTACT hContact, int type) ptrA token(getStringA("TokenSecret"));
ptrA umqid(getStringA("UMQID"));
- ptrA steamId(getStringA(hContact, "SteamID"));
+ ptrA steamId(getStringA(hContact, DBKEY_STEAM_ID));
SendRequest(new SendTypingRequest(token, umqid, steamId));
return 0;
}
diff --git a/protocols/Steam/src/steam_options.cpp b/protocols/Steam/src/steam_options.cpp index bbfa7311cd..2e52b6da46 100644 --- a/protocols/Steam/src/steam_options.cpp +++ b/protocols/Steam/src/steam_options.cpp @@ -51,7 +51,7 @@ public: m_proto->SetStatus(ID_STATUS_OFFLINE);
if (m_username.IsChanged()) {
- m_proto->delSetting("SteamID");
+ m_proto->delSetting(DBKEY_STEAM_ID);
m_proto->delSetting("TokenSecret");
}
if (m_password.IsChanged())
diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp index 4a6f04321e..e57c2af8c2 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -1,7 +1,15 @@ #include "stdafx.h"
+static int CompareRequests(const ProtoRequest *p1, const ProtoRequest *p2)
+{
+ if (p1->id == p2->id)
+ return 0;
+ return (p1->id < p2->id) ? -1 : 1;
+}
+
CSteamProto::CSteamProto(const char *protoName, const wchar_t *userName) :
- PROTO<CSteamProto>(protoName, userName)
+ PROTO<CSteamProto>(protoName, userName),
+ m_arRequests(10, CompareRequests)
{
// default group
m_defaultGroup = getWStringA("DefaultGroup");
@@ -120,8 +128,8 @@ int CSteamProto::Authorize(MEVENT hDbEvent) ptrA token(getStringA("TokenSecret"));
ptrA sessionId(getStringA("SessionID"));
- ptrA steamId(getStringA("SteamID"));
- char *who = getStringA(hContact, "SteamID");
+ ptrA steamId(getStringA(DBKEY_STEAM_ID));
+ char *who = getStringA(hContact, DBKEY_STEAM_ID);
SendRequest(
new ApprovePendingRequest(token, sessionId, steamId, who),
@@ -150,8 +158,8 @@ int CSteamProto::AuthDeny(MEVENT hDbEvent, const wchar_t*) ptrA token(getStringA("TokenSecret"));
ptrA sessionId(getStringA("SessionID"));
- ptrA steamId(getStringA("SteamID"));
- char *who = getStringA(hContact, "SteamID");
+ ptrA steamId(getStringA(DBKEY_STEAM_ID));
+ char *who = getStringA(hContact, DBKEY_STEAM_ID);
SendRequest(
new IgnorePendingRequest(token, sessionId, steamId, who),
@@ -175,8 +183,8 @@ int CSteamProto::AuthRequest(MCONTACT hContact, const wchar_t*) ptrA token(getStringA("TokenSecret"));
ptrA sessionId(getStringA("SessionID"));
- ptrA steamId(getStringA("SteamID"));
- ptrA who(getStringA(hContact, "SteamID"));
+ ptrA steamId(getStringA(DBKEY_STEAM_ID));
+ ptrA who(getStringA(hContact, DBKEY_STEAM_ID));
SendRequest(
new AddFriendRequest(token, sessionId, steamId, who),
@@ -201,7 +209,7 @@ INT_PTR CSteamProto::GetCaps(int type, MCONTACT) case PFLAGNUM_5:
return PF2_HEAVYDND | PF2_FREECHAT;
case PFLAG_UNIQUEIDTEXT:
- return (INT_PTR)TranslateT("SteamID");
+ return (INT_PTR)TranslateT(DBKEY_STEAM_ID);
default:
return 0;
}
@@ -280,9 +288,6 @@ int CSteamProto::SetStatus(int new_status) m_iDesiredStatus = new_status;
if (new_status == ID_STATUS_OFFLINE) {
- // Reset relogin flag
- isLoginAgain = false;
-
m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE;
if (!Miranda_IsTerminated())
@@ -338,8 +343,8 @@ void CSteamProto::OnContactDeleted(MCONTACT hContact) if (!getByte(hContact, "Auth", 0)) {
ptrA token(getStringA("TokenSecret"));
ptrA sessionId(getStringA("SessionID"));
- ptrA steamId(getStringA("SteamID"));
- char *who = getStringA(hContact, "SteamID");
+ ptrA steamId(getStringA(DBKEY_STEAM_ID));
+ char *who = getStringA(hContact, DBKEY_STEAM_ID);
SendRequest(new RemoveFriendRequest(token, sessionId, steamId, who), &CSteamProto::OnFriendRemoved, (void*)who);
}
}
diff --git a/protocols/Steam/src/steam_proto.h b/protocols/Steam/src/steam_proto.h index 1d933c25d6..8edf2c788a 100644 --- a/protocols/Steam/src/steam_proto.h +++ b/protocols/Steam/src/steam_proto.h @@ -8,15 +8,14 @@ #define STEAM_PROTOCOL_MASK 0x80000000
// Global settings for all accounts: hosts' list
-#define STEAM_MODULE "Steam"
-#define DBKEY_HOSTS_COUNT "HostsCount"
-#define DBKEY_HOSTS_DATE "HostsDate"
+#define STEAM_MODULE "Steam"
+#define DBKEY_HOSTS_COUNT "HostsCount"
+#define DBKEY_HOSTS_DATE "HostsDate"
-enum EMsg
-{
- ServiceMethodCallFromClientNonAuthed = 9804,
- ClientHello = 9805,
-};
+#define DBKEY_CLIENT_ID "ClientID"
+#define DBKEY_STEAM_ID "SteamID"
+#define DBKEY_ACCOUNT_NAME "Username"
+#define DBKEY_MACHINE_ID "MachineId"
struct SendAuthParam
{
@@ -38,8 +37,9 @@ enum CMI_MAX // this item shall be the last one
};
-typedef void(CSteamProto::*HttpCallback)(const HttpResponse&, void*);
-typedef void(CSteamProto::*JsonCallback)(const JSONNode&, void*);
+typedef void (CSteamProto::*MsgCallback)(const uint8_t *pBuf, size_t cbLen);
+typedef void (CSteamProto::*HttpCallback)(const HttpResponse &, void *);
+typedef void (CSteamProto::*JsonCallback)(const JSONNode &, void *);
struct HttpRequest : public MTHttpRequest<CSteamProto>
{
@@ -48,6 +48,17 @@ struct HttpRequest : public MTHttpRequest<CSteamProto> NETLIBHTTPREQUEST* Get();
};
+struct ProtoRequest
+{
+ ProtoRequest(int64_t _1, MsgCallback _2) :
+ id(_1),
+ pCallback(_2)
+ {}
+
+ int64_t id;
+ MsgCallback pCallback;
+};
+
class CSteamProto : public PROTO<CSteamProto>
{
friend class CSteamGuardDialog;
@@ -58,11 +69,18 @@ class CSteamProto : public PROTO<CSteamProto> ptrW m_password;
ptrW m_defaultGroup;
- bool isLoginAgain, m_bTerminated;
- time_t m_idleTS;
+ bool m_bTerminated;
HWND m_hwndGuard;
+ time_t m_idleTS;
+
+ int64_t GetId(const char *pszSetting);
+ void SetId(const char *pszSetting, int64_t id);
+
+ int64_t GetId(MCONTACT, const char *pszSetting);
+ void SetId(MCONTACT, const char *pszSetting, int64_t id);
// polling
+ CMStringA m_szRefreshToken, m_szAccessToken;
ULONG hAuthProcess = 1;
ULONG hMessageProcess = 1;
mir_cs m_addContactLock;
@@ -74,9 +92,16 @@ class CSteamProto : public PROTO<CSteamProto> void __cdecl ServerThread(void *);
bool ServerThreadStub(const char *szHost);
+ mir_cs m_csRequests;
+ OBJLIST<ProtoRequest> m_arRequests;
+
+ void ProcessMulti(const uint8_t *buf, size_t cbLen);
+ void ProcessPacket(const uint8_t *buf, size_t cbLen);
+ void ProcessMessage(const uint8_t *buf, size_t cbLen);
+
void WSSend(EMsg msgType, const ProtobufCppMessage &msg);
void WSSendHeader(EMsg msgType, const CMsgProtoBufHeader &hdr, const ProtobufCppMessage &msg);
- void WSSendService(const char *pszServiceName, const ProtobufCppMessage &msg);
+ void WSSendService(const char *pszServiceName, const ProtobufCppMessage &msg, MsgCallback pCallback = 0);
// requests
bool SendRequest(HttpRequest *request);
@@ -91,21 +116,17 @@ class CSteamProto : public PROTO<CSteamProto> void LoginFailed();
void Logout();
- void OnGotRsaKey(const JSONNode &root, void *);
+ void OnAuthorization(const uint8_t *buf, size_t cbLen);
+ void OnGotRsaKey(const uint8_t *buf, size_t cbLen);
+ void OnLoggedOn(const uint8_t *buf, size_t cbLen);
+ void OnPollSession(const uint8_t *buf, size_t cbLen);
void OnGotCaptcha(const HttpResponse &response, void *arg);
- void OnAuthorization(const HttpResponse &response, void *);
void OnAuthorizationError(const JSONNode &root);
- void OnAuthorizationSuccess(const JSONNode &root);
- void OnGotSession(const HttpResponse &response, void *);
void OnGotHosts(const JSONNode &root, void *);
- void OnLoggedOn(const HttpResponse &response, void *);
- void OnReLogin(const JSONNode &root, void *);
-
- void HandleTokenExpired();
void DeleteAuthSettings();
// contacts
diff --git a/protocols/Steam/src/steam_server.cpp b/protocols/Steam/src/steam_server.cpp index f69592d4ea..b3b51197e5 100644 --- a/protocols/Steam/src/steam_server.cpp +++ b/protocols/Steam/src/steam_server.cpp @@ -117,14 +117,8 @@ bool CSteamProto::ServerThreadStub(const char *szHost) case 0: // text packet case 1: // binary packet case 2: // continuation - if (hdr.bIsFinal) { - // process a packet here - CMStringA szJson((char *)netbuf.data() + hdr.headerSize, (int)hdr.payloadSize); - debugLogA("JSON received:\n%s", szJson.c_str()); - JSONNode root = JSONNode::parse(szJson); - // if (root) -// bExit = ProcessMessage(root); - } + if (hdr.bIsFinal) + ProcessPacket((const uint8_t *)netbuf.data() + hdr.headerSize, hdr.payloadSize); break; case 8: // close @@ -167,3 +161,102 @@ bool CSteamProto::ServerThreadStub(const char *szHost) m_hServerConn = nullptr; return bExit; } + +///////////////////////////////////////////////////////////////////////////////////////// + +void CSteamProto::ProcessPacket(const uint8_t *buf, size_t cbLen) +{ + uint32_t dwSign = *(uint32_t *)buf; + EMsg msgType = (EMsg)(dwSign & ~STEAM_PROTOCOL_MASK); + + // now process the body + if (msgType == EMsg::Multi) { + buf += 8; cbLen -= 8; + ProcessMulti(buf, cbLen); + } + else ProcessMessage(buf, cbLen); +} + +void CSteamProto::ProcessMulti(const uint8_t *buf, size_t cbLen) +{ + proto::MsgMulti pMulti(buf, cbLen); + if (pMulti == nullptr) { + debugLogA("Unable to decode multi message, exiting"); + return; + } + + debugLogA("processing %s multi message of size %d", (pMulti->size_unzipped) ? "zipped" : "normal", pMulti->message_body.len); + + ptrA tmp; + if (pMulti->size_unzipped) { + tmp = (char *)mir_alloc(pMulti->size_unzipped + 1); + cbLen = FreeImage_ZLibGUnzip((uint8_t*)tmp.get(), pMulti->size_unzipped, pMulti->message_body.data, (unsigned)pMulti->message_body.len); + if (!cbLen) { + debugLogA("Unable to unzip multi message, exiting"); + return; + } + + buf = (const uint8_t *)tmp.get(); + } + else { + buf = pMulti->message_body.data; + cbLen = pMulti->message_body.len; + } + + while ((int)cbLen > 0) { + uint32_t cbPacketLen = *(uint32_t *)buf; buf += sizeof(uint32_t); cbLen -= sizeof(uint32_t); + ProcessMessage(buf, cbPacketLen); + buf += cbPacketLen; cbLen -= cbPacketLen; + } +} + +void CSteamProto::ProcessMessage(const uint8_t *buf, size_t cbLen) +{ + uint32_t dwSign = *(uint32_t *)buf; buf += sizeof(uint32_t); cbLen -= sizeof(uint32_t); + EMsg msgType = (EMsg)(dwSign & ~STEAM_PROTOCOL_MASK); + bool bIsProto = (dwSign & STEAM_PROTOCOL_MASK) != 0; + + CMsgProtoBufHeader hdr; + + if (msgType == EMsg::ChannelEncryptRequest || msgType == EMsg::ChannelEncryptResult) { + hdr.has_jobid_source = hdr.has_jobid_target = true; + hdr.jobid_source = *(int64_t *)buf; buf += sizeof(int64_t); + hdr.jobid_target = *(int64_t *)buf; buf += sizeof(int64_t); + } + else if (bIsProto) { + uint32_t hdrLen = *(uint32_t *)buf; buf += sizeof(uint32_t); cbLen -= sizeof(uint32_t); + proto::MsgProtoBufHeader tmpHeader(buf, hdrLen); + if (tmpHeader == nullptr) { + debugLogA("Unable to decode message header, exiting"); + return; + } + + memcpy(&hdr, tmpHeader, sizeof(hdr)); + buf += hdrLen; cbLen -= hdrLen; + } + else { + debugLogA("Got unknown header, exiting"); + return; + } + + MsgCallback pCallback = 0; + { + mir_cslock lck(m_csRequests); + if (auto *pReq = m_arRequests.find((ProtoRequest *)&hdr.jobid_target)) { + pCallback = pReq->pCallback; + m_arRequests.remove(pReq); + } + } + + if (pCallback) { + (this->*pCallback)(buf, cbLen); + return; + } + + // persistent callbacks + switch (msgType) { + case EMsg::ClientLogOnResponse: + OnLoggedOn(buf, cbLen); + break; + } +} diff --git a/protocols/Steam/src/steam_utils.cpp b/protocols/Steam/src/steam_utils.cpp index 90b892b355..1faf408f5d 100644 --- a/protocols/Steam/src/steam_utils.cpp +++ b/protocols/Steam/src/steam_utils.cpp @@ -29,12 +29,12 @@ void CSteamProto::WSSend(EMsg msgType, const ProtobufCppMessage &msg) void CSteamProto::WSSendHeader(EMsg msgType, const CMsgProtoBufHeader &hdr, const ProtobufCppMessage &msg)
{
- unsigned hdrLen = (unsigned)protobuf_c_message_get_packed_size(&hdr);
+ uint32_t hdrLen = (uint32_t)protobuf_c_message_get_packed_size(&hdr);
MBinBuffer hdrbuf(hdrLen);
protobuf_c_message_pack(&hdr, (uint8_t *)hdrbuf.data());
hdrbuf.appendBefore(&hdrLen, sizeof(hdrLen));
- unsigned type = (unsigned)msgType;
+ uint32_t type = (uint32_t)msgType;
type |= STEAM_PROTOCOL_MASK;
hdrbuf.appendBefore(&type, sizeof(type));
Netlib_Dump(m_hServerConn, hdrbuf.data(), hdrbuf.length(), true, 0);
@@ -47,7 +47,7 @@ void CSteamProto::WSSendHeader(EMsg msgType, const CMsgProtoBufHeader &hdr, cons WebSocket_SendBinary(m_hServerConn, hdrbuf.data(), hdrbuf.length());
}
-void CSteamProto::WSSendService(const char *pszServiceName, const ProtobufCppMessage &msg)
+void CSteamProto::WSSendService(const char *pszServiceName, const ProtobufCppMessage &msg, MsgCallback pCallback)
{
CMsgProtoBufHeader hdr;
hdr.has_client_sessionid = hdr.has_steamid = hdr.has_jobid_source = hdr.has_jobid_target = true;
@@ -56,11 +56,44 @@ void CSteamProto::WSSendService(const char *pszServiceName, const ProtobufCppMes hdr.target_job_name = (char*)pszServiceName;
hdr.realm = 1; hdr.has_realm = true;
+ if (pCallback) {
+ mir_cslock lck(m_csRequests);
+ m_arRequests.insert(new ProtoRequest(hdr.jobid_source, pCallback));
+ }
+
WSSendHeader(EMsg::ServiceMethodCallFromClientNonAuthed, hdr, msg);
}
/////////////////////////////////////////////////////////////////////////////////////////
+int64_t CSteamProto::GetId(MCONTACT hContact, const char *pszSetting)
+{
+ return _atoi64(getMStringA(hContact, pszSetting));
+}
+
+void CSteamProto::SetId(MCONTACT hContact, const char *pszSetting, int64_t id)
+{
+ char szId[100];
+ _i64toa(id, szId, 10);
+ setString(hContact, pszSetting, szId);
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+int64_t CSteamProto::GetId(const char *pszSetting)
+{
+ return _atoi64(getMStringA(pszSetting));
+}
+
+void CSteamProto::SetId(const char *pszSetting, int64_t id)
+{
+ char szId[100];
+ _i64toa(id, szId, 10);
+ setString(pszSetting, szId);
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
uint16_t CSteamProto::SteamToMirandaStatus(PersonaState state)
{
switch (state) {
|