Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Groundwork for new friends/chat system #565

Merged
merged 8 commits into from
Jun 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Resources/NetHook2/NetHook2/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ CNet::CNet()

RecvPktFn pRecvPktFunc = NULL;
bool bFoundRecvPktFunc = steamClientScan.FindFunction(
"\x55\x8B\xEC\x81\xEC\x98\x04\x00\x00",
"\x55\x8B\xEC\x81\xEC\x88\x04\x00\x00",
"xxxxxxxxx",
(void **)&pRecvPktFunc
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ static class MessageTypeOverrides
{ EMsg.ClientFriendMsgIncoming, typeof(CMsgClientFriendMsgIncoming) },
{ EMsg.ClientFriendMsgEchoToSender, typeof(CMsgClientFriendMsgIncoming) },
{ EMsg.ClientCurrentUIMode, typeof(CMsgClientUIMode) },
{ EMsg.ClientCreateAccountProto, typeof(CMsgClientCreateAccount) },
{ EMsg.ClientCreateAccountProtoResponse, typeof(CMsgClientCreateAccountResponse) },
{ EMsg.ClientGetNumberOfCurrentPlayersDP, typeof(CMsgDPGetNumberOfCurrentPlayers) },
{ EMsg.ClientGetNumberOfCurrentPlayersDPResponse, typeof(CMsgDPGetNumberOfCurrentPlayersResponse) },

Expand Down
2 changes: 2 additions & 0 deletions Resources/NetHookAnalyzer2/NetHookAnalyzer2/NetHookItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ string ReadInnerMessageNameCore()
}

case SteamKit2.EMsg.ServiceMethod:
case SteamKit2.EMsg.ServiceMethodCallFromClient:
case SteamKit2.EMsg.ServiceMethodResponse:
{
var fileData = File.ReadAllBytes(FileInfo.FullName);
var hdr = new MsgHdrProtoBuf();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,20 @@ static object ReadBody(uint rawEMsg, Stream stream, ISteamSerializableHeader hea

object body;

// Unified Notifications
if (isProto && eMsg == EMsg.ServiceMethod && !string.IsNullOrEmpty(targetJobName.Value))
switch (eMsg)
{
body = UnifiedMessagingHelpers.ReadServiceMethodBody(targetJobName.Value, stream, x => x.GetParameters().First().ParameterType);
}
else
{
body = ReadMessageBody(rawEMsg, stream);
case EMsg.ServiceMethod:
case EMsg.ServiceMethodCallFromClient:
body = UnifiedMessagingHelpers.ReadServiceMethodBody(targetJobName.Value, stream, x => x.GetParameters().First().ParameterType);
break;

case EMsg.ServiceMethodResponse:
body = UnifiedMessagingHelpers.ReadServiceMethodBody(targetJobName.Value, stream, x => x.ReturnType);
break;

default:
body = ReadMessageBody(rawEMsg, stream);
break;
}

return body;
Expand Down
15 changes: 15 additions & 0 deletions Resources/Protobufs/steamclient/content_manifest.proto
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,18 @@ message ContentManifestSignature {
optional bytes signature = 1;
}

message ContentDeltaChunks {
message DeltaChunk {
optional bytes sha_source = 1;
optional bytes sha_target = 2;
optional uint32 size_original = 3;
optional uint32 patch_method = 4;
optional bytes chunk = 5;
}

optional uint32 depot_id = 1;
optional uint64 manifest_id_source = 2;
optional uint64 manifest_id_target = 3;
repeated .ContentDeltaChunks.DeltaChunk deltaChunks = 4;
}

84 changes: 76 additions & 8 deletions Resources/Protobufs/steamclient/htmlmessages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ message CMsgMouseUp {
optional uint32 mouse_button = 2;
optional uint32 modifiers = 3;
optional bool is_off_panel = 4;
optional int32 x = 5;
optional int32 y = 6;
}

message CMsgMouseDblClick {
Expand Down Expand Up @@ -75,8 +77,8 @@ message CMsgBrowserCreate {
optional bool borderless = 12 [default = false];
optional string vroverlay_key = 13;
optional uint32 browser_type = 14 [default = 0];
optional int32 initial_top = 15 [default = -1];
optional int32 initial_left = 16 [default = -1];
optional int32 initial_top = 15 [default = -2147483648];
optional int32 initial_left = 16 [default = -2147483648];
}

message CMsgBrowserCreateResponse {
Expand Down Expand Up @@ -124,10 +126,16 @@ message CMsgBrowserSetMinSize {
optional uint32 height = 3;
}

message CMsgBrowserPosition {
optional uint32 browser_handle = 1;
optional int32 x = 2;
optional int32 y = 3;
}

message CMsgBrowserResized {
optional uint32 browser_handle = 1;
optional uint32 x = 2;
optional uint32 y = 3;
optional int32 x = 2;
optional int32 y = 3;
optional uint32 width = 4;
optional uint32 height = 5;
}
Expand Down Expand Up @@ -161,6 +169,11 @@ message CMsgGoBack {
optional uint32 browser_handle = 1;
}

message CMsgWasHidden {
optional uint32 browser_handle = 1;
optional bool hidden = 2;
}

message CMsgClearHistory {
optional uint32 browser_handle = 1;
}
Expand Down Expand Up @@ -310,8 +323,8 @@ message CMsgHidePopup {

message CMsgSizePopup {
optional uint32 browser_handle = 1;
optional uint32 x = 2;
optional uint32 y = 3;
optional int32 x = 2;
optional int32 y = 3;
optional uint32 wide = 4;
optional uint32 tall = 5;
}
Expand All @@ -325,8 +338,8 @@ message CMsgOpenNewTab {
message CMsgPopupHTMLWindow {
optional uint32 browser_handle = 1;
optional string url = 2;
optional uint32 x = 3;
optional uint32 y = 4;
optional int32 x = 3 [default = -2147483648];
optional int32 y = 4 [default = -2147483648];
optional uint32 wide = 5;
optional uint32 tall = 6;
optional uint32 popup_index = 7;
Expand Down Expand Up @@ -535,6 +548,7 @@ message CMsgCanGoBackAndForward {
message CMsgOpenSteamURL {
optional uint32 browser_handle = 1;
optional string url = 2;
optional string referrer = 3;
}

message CMsgSetCookie {
Expand Down Expand Up @@ -573,6 +587,14 @@ message CMsgExitFullScreen {
optional uint32 browser_handle = 1;
}

message CMsgSetPIDShuttingDown {
optional uint32 browser_handle = 1;
}

message CMsgAckPIDShuttingDown {
optional uint32 browser_handle = 1;
}

message CMsgGetCookiesForURL {
optional uint32 browser_handle = 1;
optional string url = 2;
Expand Down Expand Up @@ -643,6 +665,14 @@ message CMsgScreenInformationChanged {
optional uint32 browser_handle = 1;
optional uint32 override_width = 2;
optional uint32 override_height = 3;
optional uint32 monitor_left = 4;
optional uint32 monitor_top = 5;
optional uint32 monitor_right = 6;
optional uint32 monitor_bottom = 7;
optional uint32 usable_left = 8;
optional uint32 usable_top = 9;
optional uint32 usable_right = 10;
optional uint32 usable_bottom = 11;
}

message CMsgClearAllCookies {
Expand Down Expand Up @@ -771,3 +801,41 @@ message CMsgDraggableRegionsChanged {
repeated .CMsgDraggableRegionsChanged.DraggableRects rects = 2;
}

message CMsgResizeGripChanged {
optional uint32 browser_handle = 1;
optional int32 width = 2;
optional int32 height = 3;
}

message CMsgSetWindowPosition {
optional uint32 browser_handle = 1;
optional int32 x = 2;
optional int32 y = 3;
optional int32 width = 4;
optional int32 height = 5;
}

message CMsgShowWindow {
optional uint32 browser_handle = 1;
}

message CMsgHideWindow {
optional uint32 browser_handle = 1;
}

message CMsgBringWindowToFront {
optional uint32 browser_handle = 1;
}

message CMsgMaximizeRestoreWindow {
optional uint32 browser_handle = 1;
}

message CMsgMinimizeWindow {
optional uint32 browser_handle = 1;
}

message CMsgShowBrowserContextMenu {
optional uint32 browser_handle = 1;
}

Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,6 @@ message CMsgSteamDatagramSignedRelayAuthTicket {
optional bytes signature = 4;
}

message CMsgSteamDatagramCertificate {
enum EKeyType {
INVALID = 0;
ED25519 = 1;
}

optional .CMsgSteamDatagramCertificate.EKeyType key_type = 1 [default = INVALID];
optional bytes key_data = 2;
optional fixed64 steam_id = 4;
repeated fixed32 gameserver_datacenter_ids = 5;
optional fixed32 time_created = 8;
optional fixed32 time_expiry = 9;
optional uint32 app_id = 10;
}

message CMsgSteamDatagramCertificateSigned {
optional bytes cert = 4;
optional fixed64 ca_key_id = 5;
optional bytes ca_signature = 6;
}

message CMsgSteamDatagramCachedCredentialsForApp {
optional bytes private_key = 1;
optional bytes cert = 2;
Expand Down
6 changes: 6 additions & 0 deletions Resources/Protobufs/steamclient/steammessages_base.proto
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ message CMsgProtoBufHeader {
optional uint32 webapi_key_id = 25;
optional bool is_from_external_source = 26;
repeated uint32 forward_to_sysid = 27;
optional uint32 cm_sysid = 28;
}

message CMsgMulti {
Expand Down Expand Up @@ -109,3 +110,8 @@ message CCuratorPreferences {
optional bool show_broadcast = 14;
}

message CLocalizationToken {
optional uint32 language = 1;
optional string localized_string = 2;
}

Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ message CMsgClientMMSInviteToLobby {
optional fixed64 steam_id_user_invited = 3;
}

message CMsgClientUDSInviteToGame {
message CMsgClientInviteToGame {
optional fixed64 steam_id_dest = 1;
optional fixed64 steam_id_src = 2;
optional string connect_string = 3;
Expand Down Expand Up @@ -1151,6 +1151,7 @@ message CMsgClientClanState {
optional uint32 online = 2;
optional uint32 chatting = 3;
optional uint32 in_game = 4;
optional uint32 chat_room_members = 5;
}

message Event {
Expand All @@ -1162,11 +1163,11 @@ message CMsgClientClanState {
}

optional fixed64 steamid_clan = 1;
optional uint32 m_unStatusFlags = 2;
optional uint32 clan_account_flags = 3;
optional .CMsgClientClanState.NameInfo name_info = 4;
optional .CMsgClientClanState.UserCounts user_counts = 5;
repeated .CMsgClientClanState.Event events = 6;
repeated .CMsgClientClanState.Event announcements = 7;
optional bool chat_room_private = 8;
}

13 changes: 0 additions & 13 deletions Resources/Protobufs/steamclient/steammessages_clientserver_2.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1162,19 +1162,6 @@ message CMsgClientKickPlayingSession {
optional bool only_stop_game = 1;
}

message CMsgClientCreateAccount {
optional string account_name = 1;
optional string password = 2;
optional string email = 3;
optional uint32 launcher = 6;
optional uint32 language = 7;
}

message CMsgClientCreateAccountResponse {
optional int32 eresult = 1 [default = 2];
optional fixed64 steamid = 2;
}

message CMsgClientVoiceCallPreAuthorize {
optional fixed64 caller_steamid = 1;
optional fixed64 receiver_steamid = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ message CMsgClientFriendMsg {
optional int32 chat_entry_type = 2;
optional bytes message = 3;
optional fixed32 rtime32_server_timestamp = 4;
optional bool echo_to_sender = 5;
}

message CMsgClientFriendMsgIncoming {
Expand Down Expand Up @@ -109,6 +110,11 @@ message CMsgPersonaChangeResponse {

message CMsgClientPersonaState {
message Friend {
message ClanData {
optional uint32 ogg_app_id = 1;
optional uint64 chat_group_id = 2;
}

message KV {
optional string key = 1;
optional string value = 2;
Expand All @@ -133,11 +139,11 @@ message CMsgClientPersonaState {
optional string game_name = 55;
optional fixed64 gameid = 56;
optional bytes game_data_blob = 60;
optional .CMsgClientPersonaState.Friend.ClanData clan_data = 64;
optional string clan_tag = 65;
optional string facebook_name = 66;
optional uint64 facebook_id = 67;
repeated .CMsgClientPersonaState.Friend.KV rich_presence = 71;
optional fixed64 broadcast_id = 72;
optional fixed64 game_lobby_id = 73;
}

optional uint32 status_flags = 1;
Expand All @@ -163,6 +169,7 @@ message CMsgClientFriendProfileInfoResponse {
message CMsgClientCreateFriendsGroup {
optional fixed64 steamid = 1;
optional string groupname = 2;
repeated fixed64 steamid_friends = 3;
}

message CMsgClientCreateFriendsGroupResponse {
Expand All @@ -179,12 +186,14 @@ message CMsgClientDeleteFriendsGroupResponse {
optional uint32 eresult = 1;
}

message CMsgClientRenameFriendsGroup {
message CMsgClientManageFriendsGroup {
optional int32 groupid = 1;
optional string groupname = 2;
repeated fixed64 steamid_friends_added = 3;
repeated fixed64 steamid_friends_removed = 4;
}

message CMsgClientRenameFriendsGroupResponse {
message CMsgClientManageFriendsGroupResponse {
optional uint32 eresult = 1;
}

Expand Down Expand Up @@ -213,6 +222,8 @@ message CMsgClientEmoticonList {
message Emoticon {
optional string name = 1;
optional int32 count = 2;
optional uint32 time_last_used = 3;
optional uint32 use_count = 4;
}

repeated .CMsgClientEmoticonList.Emoticon emoticons = 1;
Expand Down
Loading