diff --git a/src/client/component/console.cpp b/src/client/component/console.cpp index bc72a1b..f7008ac 100644 --- a/src/client/component/console.cpp +++ b/src/client/component/console.cpp @@ -171,7 +171,7 @@ namespace console } else { - std::this_thread::sleep_for(10ms); + std::this_thread::sleep_for(1ms); } } diff --git a/src/client/component/demonware.cpp b/src/client/component/demonware.cpp index 90199d2..676ce67 100644 --- a/src/client/component/demonware.cpp +++ b/src/client/component/demonware.cpp @@ -167,13 +167,14 @@ namespace demonware { int getaddrinfo_stub(PCSTR pNodeName, PCSTR pServiceName, const ADDRINFOA* pHints, PADDRINFOA* ppResult) { - printf("[ network ]: [getaddrinfo]: %s\n", pNodeName); return getaddrinfo(pNodeName, pServiceName, pHints, ppResult); } hostent* gethostbyname_stub(const char* name) { +#ifdef DEBUG printf("[ network ]: [gethostbyname]: \"%s\"\n", name); +#endif const auto server = find_server_by_name(name); diff --git a/src/client/game/demonware/servers/server_auth3.cpp b/src/client/game/demonware/servers/server_auth3.cpp index a2f7e09..80f1ba0 100644 --- a/src/client/game/demonware/servers/server_auth3.cpp +++ b/src/client/game/demonware/servers/server_auth3.cpp @@ -161,7 +161,7 @@ namespace demonware result.append(utils::string::va("Date: %s GMT\r\n", date)); result.append(utils::string::va("Content-Length: %d\r\n\r\n", content.size())); result.append(content); - printf("%s\n", result.data()); + raw_reply reply(result); this->send_reply(&reply); diff --git a/src/client/game/demonware/services/bdAnticheat.cpp b/src/client/game/demonware/services/bdAnticheat.cpp index 9204d23..d928157 100644 --- a/src/client/game/demonware/services/bdAnticheat.cpp +++ b/src/client/game/demonware/services/bdAnticheat.cpp @@ -3,7 +3,6 @@ namespace demonware { - bdAnticheat::bdAnticheat() : service(38, "bdAnticheat") { this->register_task(2, &bdAnticheat::unk2); @@ -23,5 +22,4 @@ namespace demonware auto reply = server->create_reply(this->task_id()); reply->send(); } - } diff --git a/src/client/game/demonware/services/bdAnticheat.hpp b/src/client/game/demonware/services/bdAnticheat.hpp index e2db17c..0e65bc2 100644 --- a/src/client/game/demonware/services/bdAnticheat.hpp +++ b/src/client/game/demonware/services/bdAnticheat.hpp @@ -2,7 +2,6 @@ namespace demonware { - class bdAnticheat final : public service { public: @@ -12,5 +11,4 @@ namespace demonware void unk2(service_server* server, byte_buffer* buffer) const; void report_console_details(service_server* server, byte_buffer* buffer) const; }; - } diff --git a/src/client/game/demonware/services/bdBandwidthTest.cpp b/src/client/game/demonware/services/bdBandwidthTest.cpp index c21ff03..e8b62f6 100644 --- a/src/client/game/demonware/services/bdBandwidthTest.cpp +++ b/src/client/game/demonware/services/bdBandwidthTest.cpp @@ -3,27 +3,25 @@ namespace demonware { + static uint8_t bandwidth_iw6[51] = + { + 0x0F, 0xC1, 0x1C, 0x37, 0xB8, 0xEF, 0x7C, 0xD6, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0xF4, 0x01, 0x00, 0x00, 0xD0, 0x07, + 0x00, 0x00, 0x10, 0x27, 0x00, 0x00, 0x88, 0x13, 0x00, 0x00, 0xF4, 0x01, + 0x00, 0x00, 0x02, 0x0C, 0x88, 0xB3, 0x04, 0x65, 0x89, 0xBF, 0xC3, 0x6A, + 0x27, 0x94, 0xD4, 0x8F + }; -static uint8_t bandwidth_iw6[51] = -{ - 0x0F, 0xC1, 0x1C, 0x37, 0xB8, 0xEF, 0x7C, 0xD6, 0x00, 0x00, 0x04, - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0xF4, 0x01, 0x00, 0x00, 0xD0, 0x07, - 0x00, 0x00, 0x10, 0x27, 0x00, 0x00, 0x88, 0x13, 0x00, 0x00, 0xF4, 0x01, - 0x00, 0x00, 0x02, 0x0C, 0x88, 0xB3, 0x04, 0x65, 0x89, 0xBF, 0xC3, 0x6A, - 0x27, 0x94, 0xD4, 0x8F -}; - -bdBandwidthTest::bdBandwidthTest() : service(18, "bdBandwidthTest") -{ -} - -void bdBandwidthTest::exec_task(service_server* server, const std::string& data) -{ - byte_buffer buffer; - buffer.write(sizeof bandwidth_iw6, bandwidth_iw6); - - auto reply = server->create_message(5); - reply->send(&buffer, true); -} + bdBandwidthTest::bdBandwidthTest() : service(18, "bdBandwidthTest") + { + } + void bdBandwidthTest::exec_task(service_server* server, const std::string& data) + { + byte_buffer buffer; + buffer.write(sizeof bandwidth_iw6, bandwidth_iw6); + + auto reply = server->create_message(5); + reply->send(&buffer, true); + } } diff --git a/src/client/game/demonware/services/bdBandwidthTest.hpp b/src/client/game/demonware/services/bdBandwidthTest.hpp index 26f7a46..c4feb8e 100644 --- a/src/client/game/demonware/services/bdBandwidthTest.hpp +++ b/src/client/game/demonware/services/bdBandwidthTest.hpp @@ -2,7 +2,6 @@ namespace demonware { - class bdBandwidthTest final : public service { public: @@ -11,5 +10,4 @@ namespace demonware private: void exec_task(service_server* server, const std::string& data) override; }; - } diff --git a/src/client/game/demonware/services/bdContentStreaming.cpp b/src/client/game/demonware/services/bdContentStreaming.cpp index e8f4377..8f383d8 100644 --- a/src/client/game/demonware/services/bdContentStreaming.cpp +++ b/src/client/game/demonware/services/bdContentStreaming.cpp @@ -3,7 +3,6 @@ namespace demonware { - bdContentStreaming::bdContentStreaming() : service(50, "bdContentStreaming") { this->register_task(2, &bdContentStreaming::unk2); @@ -23,5 +22,4 @@ namespace demonware auto reply = server->create_reply(this->task_id()); reply->send(); } - } diff --git a/src/client/game/demonware/services/bdContentStreaming.hpp b/src/client/game/demonware/services/bdContentStreaming.hpp index d61d1f5..6831966 100644 --- a/src/client/game/demonware/services/bdContentStreaming.hpp +++ b/src/client/game/demonware/services/bdContentStreaming.hpp @@ -2,7 +2,6 @@ namespace demonware { - class bdContentStreaming final : public service { public: @@ -12,5 +11,4 @@ namespace demonware void unk2(service_server* server, byte_buffer* buffer) const; void unk3(service_server* server, byte_buffer* buffer) const; }; - } diff --git a/src/client/game/demonware/services/bdCounters.cpp b/src/client/game/demonware/services/bdCounters.cpp index 8cd0c46..8622aa2 100644 --- a/src/client/game/demonware/services/bdCounters.cpp +++ b/src/client/game/demonware/services/bdCounters.cpp @@ -3,7 +3,6 @@ namespace demonware { - bdCounters::bdCounters() : service(23, "bdCounters") { this->register_task(1, &bdCounters::unk1); @@ -23,5 +22,4 @@ namespace demonware auto reply = server->create_reply(this->task_id()); reply->send(); } - } diff --git a/src/client/game/demonware/services/bdCounters.hpp b/src/client/game/demonware/services/bdCounters.hpp index d89fe52..cc6a693 100644 --- a/src/client/game/demonware/services/bdCounters.hpp +++ b/src/client/game/demonware/services/bdCounters.hpp @@ -2,7 +2,6 @@ namespace demonware { - class bdCounters final : public service { public: @@ -12,5 +11,4 @@ namespace demonware void unk1(service_server* server, byte_buffer* buffer) const; void unk2(service_server* server, byte_buffer* buffer) const; }; - } diff --git a/src/client/game/demonware/services/bdEventLog.cpp b/src/client/game/demonware/services/bdEventLog.cpp index 35324a0..4c0c58c 100644 --- a/src/client/game/demonware/services/bdEventLog.cpp +++ b/src/client/game/demonware/services/bdEventLog.cpp @@ -3,7 +3,6 @@ namespace demonware { - bdEventLog::bdEventLog() : service(67, "bdEventLog") { this->register_task(6, &bdEventLog::unk6); @@ -15,5 +14,4 @@ namespace demonware auto reply = server->create_reply(this->task_id()); reply->send(); } - } diff --git a/src/client/game/demonware/services/bdEventLog.hpp b/src/client/game/demonware/services/bdEventLog.hpp index 05df769..ade4912 100644 --- a/src/client/game/demonware/services/bdEventLog.hpp +++ b/src/client/game/demonware/services/bdEventLog.hpp @@ -2,7 +2,6 @@ namespace demonware { - class bdEventLog final : public service { public: @@ -11,5 +10,4 @@ namespace demonware private: void unk6(service_server* server, byte_buffer* buffer) const; }; - } diff --git a/src/client/game/demonware/services/bdFacebook.cpp b/src/client/game/demonware/services/bdFacebook.cpp index 67a93a8..ea35011 100644 --- a/src/client/game/demonware/services/bdFacebook.cpp +++ b/src/client/game/demonware/services/bdFacebook.cpp @@ -3,7 +3,6 @@ namespace demonware { - bdFacebook::bdFacebook() : service(36, "bdFacebook") { this->register_task(1, &bdFacebook::unk1); @@ -39,5 +38,4 @@ namespace demonware auto reply = server->create_reply(this->task_id()); reply->send(); } - } diff --git a/src/client/game/demonware/services/bdFacebook.hpp b/src/client/game/demonware/services/bdFacebook.hpp index e3ecac2..dc12339 100644 --- a/src/client/game/demonware/services/bdFacebook.hpp +++ b/src/client/game/demonware/services/bdFacebook.hpp @@ -2,7 +2,6 @@ namespace demonware { - class bdFacebook final : public service { public: @@ -14,5 +13,4 @@ namespace demonware void unk7(service_server* server, byte_buffer* buffer) const; void unk8(service_server* server, byte_buffer* buffer) const; }; - } diff --git a/src/client/game/demonware/services/bdGroups.cpp b/src/client/game/demonware/services/bdGroups.cpp index a2b7a80..ceaf9bc 100644 --- a/src/client/game/demonware/services/bdGroups.cpp +++ b/src/client/game/demonware/services/bdGroups.cpp @@ -3,7 +3,6 @@ namespace demonware { - bdGroups::bdGroups() : service(28, "bdGroup") { this->register_task(1, &bdGroups::set_groups); @@ -23,5 +22,4 @@ namespace demonware auto reply = server->create_reply(this->task_id()); reply->send(); } - } diff --git a/src/client/game/demonware/services/bdGroups.hpp b/src/client/game/demonware/services/bdGroups.hpp index 45836c7..ff42f1c 100644 --- a/src/client/game/demonware/services/bdGroups.hpp +++ b/src/client/game/demonware/services/bdGroups.hpp @@ -2,7 +2,6 @@ namespace demonware { - class bdGroups final : public service { public: @@ -12,5 +11,4 @@ namespace demonware void set_groups(service_server* server, byte_buffer* buffer) const; void unk4(service_server* server, byte_buffer* buffer) const; }; - } diff --git a/src/client/game/demonware/services/bdMarketing.cpp b/src/client/game/demonware/services/bdMarketing.cpp index 4146bec..7ac7ae5 100644 --- a/src/client/game/demonware/services/bdMarketing.cpp +++ b/src/client/game/demonware/services/bdMarketing.cpp @@ -3,7 +3,6 @@ namespace demonware { - bdMarketing::bdMarketing() : service(139, "bdMarketing") { this->register_task(3, &bdMarketing::unk3); @@ -15,5 +14,4 @@ namespace demonware auto reply = server->create_reply(this->task_id()); reply->send(); } - } diff --git a/src/client/game/demonware/services/bdMarketing.hpp b/src/client/game/demonware/services/bdMarketing.hpp index b3a9108..9875ebb 100644 --- a/src/client/game/demonware/services/bdMarketing.hpp +++ b/src/client/game/demonware/services/bdMarketing.hpp @@ -2,7 +2,6 @@ namespace demonware { - class bdMarketing final : public service { public: @@ -11,5 +10,4 @@ namespace demonware private: void unk3(service_server* server, byte_buffer* buffer) const; }; - } diff --git a/src/client/game/demonware/services/bdMatchMaking2.cpp b/src/client/game/demonware/services/bdMatchMaking2.cpp index 917140d..f1787b4 100644 --- a/src/client/game/demonware/services/bdMatchMaking2.cpp +++ b/src/client/game/demonware/services/bdMatchMaking2.cpp @@ -3,7 +3,6 @@ namespace demonware { - bdMatchMaking2::bdMatchMaking2() : service(138, "bdMatchMaking2") { this->register_task(1, &bdMatchMaking2::unk1); @@ -47,5 +46,4 @@ namespace demonware auto reply = server->create_reply(this->task_id()); reply->send(); } - } diff --git a/src/client/game/demonware/services/bdMatchMaking2.hpp b/src/client/game/demonware/services/bdMatchMaking2.hpp index 6466768..faea8e9 100644 --- a/src/client/game/demonware/services/bdMatchMaking2.hpp +++ b/src/client/game/demonware/services/bdMatchMaking2.hpp @@ -2,7 +2,6 @@ namespace demonware { - class bdMatchMaking2 final : public service { public: @@ -15,5 +14,4 @@ namespace demonware void unk5(service_server* server, byte_buffer* buffer) const; void unk16(service_server* server, byte_buffer* buffer) const; }; - } diff --git a/src/client/game/demonware/services/bdPresence.cpp b/src/client/game/demonware/services/bdPresence.cpp index ab58421..b0523da 100644 --- a/src/client/game/demonware/services/bdPresence.cpp +++ b/src/client/game/demonware/services/bdPresence.cpp @@ -3,7 +3,6 @@ namespace demonware { - bdPresence::bdPresence() : service(103, "bdPresence") { this->register_task(1, &bdPresence::unk1); @@ -23,5 +22,4 @@ namespace demonware auto reply = server->create_reply(this->task_id()); reply->send(); } - } diff --git a/src/client/game/demonware/services/bdPresence.hpp b/src/client/game/demonware/services/bdPresence.hpp index 7f87a0e..df76cae 100644 --- a/src/client/game/demonware/services/bdPresence.hpp +++ b/src/client/game/demonware/services/bdPresence.hpp @@ -2,7 +2,6 @@ namespace demonware { - class bdPresence final : public service { public: @@ -12,5 +11,4 @@ namespace demonware void unk1(service_server* server, byte_buffer* buffer) const; void unk3(service_server* server, byte_buffer* buffer) const; }; - } diff --git a/src/client/game/demonware/services/bdProfiles.cpp b/src/client/game/demonware/services/bdProfiles.cpp index 9ad1ed3..e8f65e8 100644 --- a/src/client/game/demonware/services/bdProfiles.cpp +++ b/src/client/game/demonware/services/bdProfiles.cpp @@ -3,7 +3,6 @@ namespace demonware { - bdProfiles::bdProfiles() : service(8, "bdProfiles") { this->register_task(3, &bdProfiles::unk3); @@ -15,5 +14,4 @@ namespace demonware auto reply = server->create_reply(this->task_id()); reply->send(); } - } diff --git a/src/client/game/demonware/services/bdProfiles.hpp b/src/client/game/demonware/services/bdProfiles.hpp index 2fdb6e1..3c090e8 100644 --- a/src/client/game/demonware/services/bdProfiles.hpp +++ b/src/client/game/demonware/services/bdProfiles.hpp @@ -2,7 +2,6 @@ namespace demonware { - class bdProfiles final : public service { public: @@ -11,5 +10,4 @@ namespace demonware private: void unk3(service_server* server, byte_buffer* buffer) const; }; - } diff --git a/src/client/game/demonware/services/bdRichPresence.cpp b/src/client/game/demonware/services/bdRichPresence.cpp index 62c3c4e..d462775 100644 --- a/src/client/game/demonware/services/bdRichPresence.cpp +++ b/src/client/game/demonware/services/bdRichPresence.cpp @@ -3,7 +3,6 @@ namespace demonware { - bdRichPresence::bdRichPresence() : service(68, "bdRichPresence") { this->register_task(1, &bdRichPresence::unk1); @@ -23,5 +22,4 @@ namespace demonware auto reply = server->create_reply(this->task_id()); reply->send(); } - } diff --git a/src/client/game/demonware/services/bdRichPresence.hpp b/src/client/game/demonware/services/bdRichPresence.hpp index d1fc814..c04d91a 100644 --- a/src/client/game/demonware/services/bdRichPresence.hpp +++ b/src/client/game/demonware/services/bdRichPresence.hpp @@ -2,7 +2,6 @@ namespace demonware { - class bdRichPresence final : public service { public: @@ -12,5 +11,4 @@ namespace demonware void unk1(service_server* server, byte_buffer* buffer) const; void unk2(service_server* server, byte_buffer* buffer) const; }; - } diff --git a/src/client/game/demonware/services/bdStats.cpp b/src/client/game/demonware/services/bdStats.cpp index 4d38b28..a1d2699 100644 --- a/src/client/game/demonware/services/bdStats.cpp +++ b/src/client/game/demonware/services/bdStats.cpp @@ -3,7 +3,6 @@ namespace demonware { - bdStats::bdStats() : service(4, "bdStats") { this->register_task(1, &bdStats::unk1); @@ -47,5 +46,4 @@ namespace demonware auto reply = server->create_reply(this->task_id()); reply->send(); } - } diff --git a/src/client/game/demonware/services/bdStats.hpp b/src/client/game/demonware/services/bdStats.hpp index 2df1c0f..e84a643 100644 --- a/src/client/game/demonware/services/bdStats.hpp +++ b/src/client/game/demonware/services/bdStats.hpp @@ -2,7 +2,6 @@ namespace demonware { - class bdStats final : public service { public: @@ -15,5 +14,4 @@ namespace demonware void unk8(service_server* server, byte_buffer* buffer) const; void unk11(service_server* server, byte_buffer* buffer) const; }; - } diff --git a/src/client/game/demonware/services/bdStorage.hpp b/src/client/game/demonware/services/bdStorage.hpp index 5d7e459..2616a65 100644 --- a/src/client/game/demonware/services/bdStorage.hpp +++ b/src/client/game/demonware/services/bdStorage.hpp @@ -2,7 +2,6 @@ namespace demonware { - class bdStorage final : public service { public: @@ -22,5 +21,4 @@ namespace demonware static std::string get_user_file_path(const std::string& name); }; - } // namespace demonware diff --git a/src/client/game/demonware/services/bdUNK104.cpp b/src/client/game/demonware/services/bdUNK104.cpp index fe6d755..954c8d7 100644 --- a/src/client/game/demonware/services/bdUNK104.cpp +++ b/src/client/game/demonware/services/bdUNK104.cpp @@ -3,7 +3,6 @@ namespace demonware { - bdUNK104::bdUNK104() : service(104, "bdUNK104") { this->register_task(1, &bdUNK104::unk1); @@ -15,5 +14,4 @@ namespace demonware auto reply = server->create_reply(this->task_id()); reply->send(); } - } diff --git a/src/client/game/demonware/services/bdUNK104.hpp b/src/client/game/demonware/services/bdUNK104.hpp index e482b02..a3acf9d 100644 --- a/src/client/game/demonware/services/bdUNK104.hpp +++ b/src/client/game/demonware/services/bdUNK104.hpp @@ -2,7 +2,6 @@ namespace demonware { - class bdUNK104 final : public service { public: @@ -11,5 +10,4 @@ namespace demonware private: void unk1(service_server* server, byte_buffer* buffer) const; }; - } diff --git a/src/client/game/demonware/services/bdUNK63.cpp b/src/client/game/demonware/services/bdUNK63.cpp index 031ffe1..be21bc9 100644 --- a/src/client/game/demonware/services/bdUNK63.cpp +++ b/src/client/game/demonware/services/bdUNK63.cpp @@ -3,7 +3,6 @@ namespace demonware { - bdUNK63::bdUNK63() : service(63, "bdUNK63") { //this->register_task(6, "unk6", &bdUNK63::unk6); @@ -15,5 +14,4 @@ namespace demonware auto reply = server->create_reply(this->task_id()); reply->send(); } - } diff --git a/src/client/game/demonware/services/bdUNK63.hpp b/src/client/game/demonware/services/bdUNK63.hpp index 535b904..85ed78b 100644 --- a/src/client/game/demonware/services/bdUNK63.hpp +++ b/src/client/game/demonware/services/bdUNK63.hpp @@ -2,7 +2,6 @@ namespace demonware { - class bdUNK63 final : public service { public: @@ -11,5 +10,4 @@ namespace demonware private: void unk(service_server* server, byte_buffer* buffer) const; }; - } diff --git a/src/client/game/demonware/services/bdUNK80.cpp b/src/client/game/demonware/services/bdUNK80.cpp index 6c764d3..8310d93 100644 --- a/src/client/game/demonware/services/bdUNK80.cpp +++ b/src/client/game/demonware/services/bdUNK80.cpp @@ -3,7 +3,6 @@ namespace demonware { - bdUNK80::bdUNK80() : service(80, "bdUNK80") { this->register_task(42, &bdUNK80::unk42); @@ -55,5 +54,4 @@ namespace demonware auto reply = server->create_reply(this->task_id()); reply->send(); } - } diff --git a/src/client/game/demonware/services/bdUNK80.hpp b/src/client/game/demonware/services/bdUNK80.hpp index aaa88c4..3d4026e 100644 --- a/src/client/game/demonware/services/bdUNK80.hpp +++ b/src/client/game/demonware/services/bdUNK80.hpp @@ -2,7 +2,6 @@ namespace demonware { - class bdUNK80 final : public service { public: @@ -16,5 +15,4 @@ namespace demonware void unk165(service_server* server, byte_buffer* buffer) const; void unk193(service_server* server, byte_buffer* buffer) const; }; - } diff --git a/src/client/steam/interfaces/user.cpp b/src/client/steam/interfaces/user.cpp index c6dd42e..5968832 100644 --- a/src/client/steam/interfaces/user.cpp +++ b/src/client/steam/interfaces/user.cpp @@ -13,7 +13,6 @@ namespace steam { steam_id id{}; id.bits = auth::get_guid(); - printf("STEAMBITS: %llu\n", id.bits); return id; } } @@ -129,7 +128,9 @@ namespace steam unsigned long long user::RequestEncryptedAppTicket(void* pUserData, int cbUserData) { +#ifdef DEBUG printf("[steam_api]: [user]: request encrypted app ticket\n"); +#endif // Generate the authentication ticket const auto id = this->GetSteamID(); @@ -154,7 +155,9 @@ namespace steam bool user::GetEncryptedAppTicket(void* pTicket, int cbMaxTicket, unsigned int* pcbTicket) { +#ifdef DEBUG printf("[steam_api]: [user]: sending encrypted app ticket\n"); +#endif if (cbMaxTicket < 0 || auth_ticket.empty()) return false; const auto size = std::min(size_t(cbMaxTicket), auth_ticket.size());