From c0f1354a301ce2a2fc867a89fafdde4571c07c02 Mon Sep 17 00:00:00 2001 From: boris Date: Wed, 2 Jan 2019 21:11:03 +1300 Subject: 6IX9INE "Billy" (WSHH Exclusive - Official Music Video) --- csgo-loader/csgo-client/Login/RemoteLogin.cpp | 30 +++++++++++++++++++-------- csgo-loader/csgo-client/Login/RemoteLogin.hpp | 3 ++- 2 files changed, 23 insertions(+), 10 deletions(-) (limited to 'csgo-loader/csgo-client/Login') diff --git a/csgo-loader/csgo-client/Login/RemoteLogin.cpp b/csgo-loader/csgo-client/Login/RemoteLogin.cpp index 6e70f86..7942c3b 100644 --- a/csgo-loader/csgo-client/Login/RemoteLogin.cpp +++ b/csgo-loader/csgo-client/Login/RemoteLogin.cpp @@ -18,13 +18,25 @@ namespace Login strcpy_s< 128 >(m_Header.m_Password, Password); // Initialise the header with the Hardware ID. - m_Header.m_HardwareId = 0xFFFFFFFF; + Security::HardwareIdentifier HardwareId = Protection->GetHardwareId(); + + WRAP_IF_DEBUG( + printf("[DEBUG] LoginTransactionStart\n"); + printf("[DEBUG] Processor count: %d\n", HardwareId.m_CpuCount); + printf("[DEBUG] Processor architecture: %d\n", HardwareId.m_CpuArchitecture); + printf("[DEBUG] Hard-drive Serial: %llx\n", HardwareId.m_HardDiskSerialHash); + + for(int i = 0; i < 4; ++i) + printf("[DEBUG] Safety check #%d: %s\n", i, HardwareId.m_SpecialMode[i] ? "TRUE" : "FALSE"); + ); + + m_Header.m_HardwareId = fnv::hash_runtime_data((void *)(&HardwareId), sizeof Security::HardwareIdentifier); // TODO: Verify integrity of system. // 0 for integrity passed, random bit for failure - m_Header.m_IntegrityBit1 = 0; - m_Header.m_IntegrityBit2 = 0; - m_Header.m_IntegrityBit3 = 0; + m_Header.m_IntegrityBit1 = HardwareId.m_SpecialMode[Security::DEBUGGING_MODE]; + m_Header.m_IntegrityBit2 = HardwareId.m_SpecialMode[Security::TEST_BUILD_MODE]; + m_Header.m_IntegrityBit3 = HardwareId.m_SpecialMode[Security::TEST_SIGN_MODE]; // The checksum bit, the server will check this first to detect possible tampering. m_Header.m_IntegrityBit4 = m_Header.m_IntegrityBit1 @@ -48,20 +60,20 @@ namespace Login case RemoteLoginResponse::ACCESS_AUTHORISED: return true; case RemoteLoginResponse::OUTDATED_CLIENT: - INFO_ASSERT(STR("[000A:%08x] Your client is outdated.\nPlease download the latest client at 'moneybot.cc'."), m_Header.m_HardwareId ^ ServerResponse); + INFO_ASSERT(STR("[000A:%llx] Your client is outdated.\nPlease download the latest client at 'moneybot.cc'."), m_Header.m_HardwareId ^ ServerResponse); break; case RemoteLoginResponse::USER_BANNED: - INFO_ASSERT(STR("[000D:%08x] Your account is banned.\nPlease contact 'admin@moneybot.cc' for additional information."), m_Header.m_HardwareId ^ ServerResponse); + INFO_ASSERT(STR("[000D:%llx] Your account is banned.\nPlease contact 'admin@moneybot.cc' for additional information."), m_Header.m_HardwareId ^ ServerResponse); break; case RemoteLoginResponse::INVALID_HARDWARE: - UserInterface->m_Data.m_Error = UserExperience::ERROR_INVALID_HWID; + INFO_ASSERT(STR("[000D:%llx] Your Hardware-ID is incorrect!\nPlease contact a staff member."), m_Header.m_HardwareId ^ ServerResponse); break; case RemoteLoginResponse::INVALID_CREDENTIALS: - INFO_ASSERT(STR("[000C:%08x] Your credentials are invalid. Please check your spelling and try again."), m_Header.m_HardwareId ^ ServerResponse); + INFO_ASSERT(STR("[000C:%llx] Your credentials are invalid. Please check your spelling and try again."), m_Header.m_HardwareId ^ ServerResponse); break; case RemoteLoginResponse::INTEGRITY_FAILURE: case RemoteLoginResponse::NO_SUBSCRIPTION: - INFO_ASSERT(STR("[0005:%08x] No active subscription found."), m_Header.m_HardwareId ^ ServerResponse); + INFO_ASSERT(STR("[0005:%llx] No active subscription found."), m_Header.m_HardwareId ^ ServerResponse); break; } diff --git a/csgo-loader/csgo-client/Login/RemoteLogin.hpp b/csgo-loader/csgo-client/Login/RemoteLogin.hpp index 071bb13..9575193 100644 --- a/csgo-loader/csgo-client/Login/RemoteLogin.hpp +++ b/csgo-loader/csgo-client/Login/RemoteLogin.hpp @@ -6,6 +6,7 @@ #include #include +#include using ByteArray = std::vector; @@ -24,7 +25,7 @@ namespace Login char m_Password[128]; // This will provide the hardware ID of the machine. - uint32_t m_HardwareId; + uint64_t m_HardwareId; // These fields will be set according // to security check results. -- cgit v1.2.3