Обновление How to play with Panorama on Community servers

  • Автор темы Автор темы wertaS
  • Дата начала Дата начала
Пользователь
Пользователь
Статус
Оффлайн
Регистрация
4 Июл 2018
Сообщения
630
Реакции
91
How to play with Panorama on Community servers
If you ever try connect to some servers you will see this error in console:

Dr71UVW.png



First i thought that i can just hook IVEngineClient::GetClientVersion, but no results. Then i reversed and saw that game use stored value, not that method.
So i wrote this code and it works!
Code:
  1. auto engine_dll = (DWORD)GetModuleHandleA("engine.dll");
  2. auto& g_iClientVersion = *(int*)(*(DWORD*)(engine_dll + 0x1B2FA9));
  3. g_iClientVersion = 13638;
But then i meet another error:

aWPFw3f.png


But since i've worked with network messages before it was easy for me.
We should hook SendNetMsg(40 index in INetChannel), compare INetMessage name to "CCLCMsg_ClientInfo", and replace
Пожалуйста, авторизуйтесь для просмотра ссылки.
to 0x6DB42B5(dumped value in default cs:go)
Code:
  1. class INetMessage
  2. {
  3. public:
  4. virtual ~INetMessage() {};
  5. virtual void SetNetChannel(void* netchan) = 0;
  6. virtual void SetReliable(bool state) = 0;
  7. virtual bool Process(void) = 0;
  8. virtual bool ReadFromBuffer(bf_read &buffer) = 0;
  9. virtual bool WriteToBuffer(bf_write &buffer) = 0;
  10. virtual bool IsReliable(void) const = 0;
  11. virtual int GetType(void) const = 0;
  12. virtual int GetGroup(void) const = 0;
  13. virtual const char *GetName(void) const = 0;
  14. virtual void *GetNetChannel(void) const = 0;
  15. virtual const char *ToString(void) const = 0;
  16. };
  17. class cnetmsg_clientinfo {
  18. private:
  19. char __PAD0[0x8];
  20. public:
  21. uint32_t send_table_crc;
  22. uint32_t server_count;
  23. bool is_hltv;
  24. bool is_replay;
  25. uint32_t friends_id;
  26. };
  27. class CNetMessagePB : public INetMessage, public T {};
  28. using cclcmsg_clientinfo_t = CNetMessagePB<cnetmsg_clientinfo>;
And in SendNetMsg hook:
Code:
  1. if (strcmp(name, "CCLCMsg_ClientInfo") == 0)
  2. {
  3. auto clientinfo_msg = (cclcmsg_clientinfo_t*)msg;
  4. clientinfo_msg->send_table_crc = 0x6DB42B5;
  5. }
But since a lot of stuff is not the same as on server we should add anti file crc check:
Code:
  1. if (strcmp(name, "CCLCMsg_FileCRCCheck") == 0)
  2. {
  3. return false;
  4. }
Thats it! Now we can easily play on community servers with new panorama UI.
 
Назад
Сверху Снизу