Вопрос Protobuf with dota2 to listen to all network packet

Начинающий
Статус
Оффлайн
Регистрация
11 Фев 2023
Сообщения
40
Реакции[?]
0
Поинты[?]
0
does any 1 have a clue how can i make this work ?

can some 1 explain in very good step by step details how can i listen to the network packets and act accordingly ?
 
Girl
Пользователь
Статус
Оффлайн
Регистрация
11 Ноя 2019
Сообщения
248
Реакции[?]
46
Поинты[?]
3K
does any 1 have a clue how can i make this work ?
what you tried?

can some 1 explain in very good step by step details how can i listen to the network packets and act accordingly ?
get ISteamGameCoordinator via steam_api
C++:
ISteamGameCoordinator gc = SteamClient()->GetISteamGenericInterface(GetHSteamUser(), GetHSteamPipe(), "SteamGameCoordinator001");
and hook vmt for SendMessage/RetrieveMessage
 
Участник
Статус
Оффлайн
Регистрация
23 Май 2019
Сообщения
781
Реакции[?]
331
Поинты[?]
63K
what you tried?


get ISteamGameCoordinator via steam_api
C++:
ISteamGameCoordinator gc = SteamClient()->GetISteamGenericInterface(GetHSteamUser(), GetHSteamPipe(), "SteamGameCoordinator001");
and hook vmt for SendMessage/RetrieveMessage
that's gc, he wants in-game network communications(not explicitly stated here but apparent from his previous posts)
does any 1 have a clue how can i make this work ?

can some 1 explain in very good step by step details how can i listen to the network packets and act accordingly ?
cant explain step by step cuz im busy rn but the gist is
get protobuf(dota uses 3.21.8, you want the same version for ABI compatibility)
Пожалуйста, авторизуйтесь для просмотра ссылки.
compile protoc and libprotobuf
Пожалуйста, авторизуйтесь для просмотра ссылки.
get dota2's .proto's, select what you need, compile with protoc, add the resulting .cc to your project/build script/whatever
link against libprotobuf in your project(or add the sources to your project in accordance with protobuf's build script), include the headers you need, voila
.proto files describe the format of the message(s) in a "generic" way, you use protoc to translate it to cpp.
libprotobuf provides the stuff you need to actually work with in-memory messages as well as serialization/deserialization
 
Girl
Пользователь
Статус
Оффлайн
Регистрация
11 Ноя 2019
Сообщения
248
Реакции[?]
46
Поинты[?]
3K
he wants in-game network communications
if its true, then u need to get netchan via source sdk
C++:
CEngineClient* client = CreateInterface("Source2EngineToClient001");
CNetChan* netchan = client->GetNetChannelInfo();
and also hook vmt SendNetMessage/PostReceivedNetMessage
at this step it is already possible to work with raw data, but for complete happiness we do as Liberalist wrote
 
Girl
Пользователь
Статус
Оффлайн
Регистрация
11 Ноя 2019
Сообщения
248
Реакции[?]
46
Поинты[?]
3K
Сверху Снизу