From 938952e67d3a02f1db9924edfe3d330ee6d36f8c Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Sun, 28 Aug 2022 22:04:19 +0300 Subject: [PATCH 1/3] Update EMsg --- Resources/SteamLanguage/emsg.steamd | 12 ++++++++++++ SteamKit2/SteamKit2/Base/Generated/SteamLanguage.cs | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/Resources/SteamLanguage/emsg.steamd b/Resources/SteamLanguage/emsg.steamd index 0d6525d45..0e951bb42 100644 --- a/Resources/SteamLanguage/emsg.steamd +++ b/Resources/SteamLanguage/emsg.steamd @@ -70,6 +70,7 @@ enum EMsg UpdateScheduledTaskEnableState_TEST = 244; UpdateScheduledTaskEnableStateResponse_TEST = 245; ContentDescriptionDeltaUpdate = 246; + GMShellAndServerAddressUpdates = 247; BaseGM = 300; Heartbeat = 300; @@ -100,6 +101,7 @@ enum EMsg GMTestNextBuildSchemaConversionResponse = 335; ExpectShellRestart = 336; HotFixProgress = 337; + GMStatsForwardToAdminConnections = 338; BaseAIS = 400; AISRefreshContentDescription = 401; removed @@ -705,6 +707,12 @@ enum EMsg GCHAccountPhoneNumberChange = 2236; GCHAccountTwoFactorChange = 2237; GCHInviteUserToLobby = 2238; + GCHUpdateMultipleSessions = 2239; + GCHMarkAppSessionsAuthoritative = 2240; + GCHRecurringSubscriptionStatusChange = 2241; + GCHAppCheersReceived = 2242; + GCHAppCheersGetAllowedTypes = 2243; + GCHAppCheersGetAllowedTypesResponse = 2244; BaseP2P = 2500; P2PIntroducerMessage = 2502; @@ -1222,6 +1230,8 @@ enum EMsg AMRequestPersonaUpdateForChatServer = 4420; AMPerfectWorldPayment = 4421; AMPerfectWorldPaymentResponse = 4422; + AMECommPayPayment = 4423; + AMECommPayPaymentResponse = 4424; BasePSRange = 5000; PSCreateShoppingCart = 5001; @@ -1987,6 +1997,8 @@ enum EMsg ClientVoiceCallPreAuthorizeResponse = 9801; ClientServerTimestampRequest = 9802; ClientServerTimestampResponse = 9803; + ServiceMethodCallFromClientNonAuthed = 9804; + ClientHello = 9805; ClientLANP2PBase = 9900; ClientLANP2PRequestChunk = 9900; diff --git a/SteamKit2/SteamKit2/Base/Generated/SteamLanguage.cs b/SteamKit2/SteamKit2/Base/Generated/SteamLanguage.cs index 1ffc05096..712488052 100644 --- a/SteamKit2/SteamKit2/Base/Generated/SteamLanguage.cs +++ b/SteamKit2/SteamKit2/Base/Generated/SteamLanguage.cs @@ -73,6 +73,7 @@ public enum EMsg UpdateScheduledTaskEnableState_TEST = 244, UpdateScheduledTaskEnableStateResponse_TEST = 245, ContentDescriptionDeltaUpdate = 246, + GMShellAndServerAddressUpdates = 247, BaseGM = 300, Heartbeat = 300, ShellFailed = 301, @@ -100,6 +101,7 @@ public enum EMsg GMTestNextBuildSchemaConversionResponse = 335, ExpectShellRestart = 336, HotFixProgress = 337, + GMStatsForwardToAdminConnections = 338, BaseAIS = 400, AISRequestContentDescription = 402, AISUpdateAppInfo = 403, @@ -601,6 +603,12 @@ public enum EMsg GCHAccountPhoneNumberChange = 2236, GCHAccountTwoFactorChange = 2237, GCHInviteUserToLobby = 2238, + GCHUpdateMultipleSessions = 2239, + GCHMarkAppSessionsAuthoritative = 2240, + GCHRecurringSubscriptionStatusChange = 2241, + GCHAppCheersReceived = 2242, + GCHAppCheersGetAllowedTypes = 2243, + GCHAppCheersGetAllowedTypesResponse = 2244, BaseP2P = 2500, P2PIntroducerMessage = 2502, BaseSM = 2900, @@ -1075,6 +1083,8 @@ public enum EMsg AMRequestPersonaUpdateForChatServer = 4420, AMPerfectWorldPayment = 4421, AMPerfectWorldPaymentResponse = 4422, + AMECommPayPayment = 4423, + AMECommPayPaymentResponse = 4424, BasePSRange = 5000, PSCreateShoppingCart = 5001, PSCreateShoppingCartResponse = 5002, @@ -1727,6 +1737,8 @@ public enum EMsg ClientVoiceCallPreAuthorizeResponse = 9801, ClientServerTimestampRequest = 9802, ClientServerTimestampResponse = 9803, + ServiceMethodCallFromClientNonAuthed = 9804, + ClientHello = 9805, ClientLANP2PBase = 9900, ClientLANP2PRequestChunk = 9900, ClientLANP2PRequestChunkResponse = 9901, From dbf21f50ff3a7f0a1733bb92d0cac6cc7def9243 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Sun, 28 Aug 2022 22:08:53 +0300 Subject: [PATCH 2/3] Send client hello on connect --- SteamKit2/SteamKit2/Steam/CMClient.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SteamKit2/SteamKit2/Steam/CMClient.cs b/SteamKit2/SteamKit2/Steam/CMClient.cs index bd39dd571..a6ae55d32 100644 --- a/SteamKit2/SteamKit2/Steam/CMClient.cs +++ b/SteamKit2/SteamKit2/Steam/CMClient.cs @@ -396,6 +396,10 @@ protected virtual bool OnClientMsgReceived( [NotNullWhen( true )] IPacketMsg? pa /// protected virtual void OnClientConnected() { + var request = new ClientMsgProtobuf( EMsg.ClientHello ); + request.Body.protocol_version = MsgClientLogon.CurrentProtocol; + + Send( request ); } /// /// Called when the client is physically disconnected from Steam3. From 8af2a58592ef020e1e7361e741dd2b95a476ab62 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Sun, 28 Aug 2022 22:09:34 +0300 Subject: [PATCH 3/3] Send ServiceMethodCallFromClientNonAuthed for non logged in clients --- .../Handlers/SteamUnifiedMessages/SteamUnifiedMessages.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SteamKit2/SteamKit2/Steam/Handlers/SteamUnifiedMessages/SteamUnifiedMessages.cs b/SteamKit2/SteamKit2/Steam/Handlers/SteamUnifiedMessages/SteamUnifiedMessages.cs index 35f967228..c46e5b353 100644 --- a/SteamKit2/SteamKit2/Steam/Handlers/SteamUnifiedMessages/SteamUnifiedMessages.cs +++ b/SteamKit2/SteamKit2/Steam/Handlers/SteamUnifiedMessages/SteamUnifiedMessages.cs @@ -169,7 +169,8 @@ public AsyncJob SendMessage( string name, TRequ throw new ArgumentNullException( nameof( message ) ); } - var msg = new ClientMsgProtobuf( EMsg.ServiceMethodCallFromClient ); + var eMsg = Client.SteamID == null ? EMsg.ServiceMethodCallFromClientNonAuthed : EMsg.ServiceMethodCallFromClient; + var msg = new ClientMsgProtobuf( eMsg ); msg.SourceJobID = Client.GetNextJobID(); msg.Header.Proto.target_job_name = name; msg.Body = message; @@ -194,7 +195,8 @@ public void SendNotification( string name, TRequest message ) // Notifications do not set source jobid, otherwise Steam server will actively reject this message // if the method being used is a "Notification" - var msg = new ClientMsgProtobuf( EMsg.ServiceMethodCallFromClient ); + var eMsg = Client.SteamID == null ? EMsg.ServiceMethodCallFromClientNonAuthed : EMsg.ServiceMethodCallFromClient; + var msg = new ClientMsgProtobuf( eMsg ); msg.Header.Proto.target_job_name = name; msg.Body = message; Client.Send( msg );