From 0c194bc8046cb3ecb4e4d0577f36a1d3bde58d11 Mon Sep 17 00:00:00 2001 From: boris Date: Thu, 27 Dec 2018 22:42:05 +1300 Subject: bap --- csgo-loader/csgo-client/Login/RemoteLogin.cpp | 28 +++++++++------------------ csgo-loader/csgo-client/Login/RemoteLogin.hpp | 5 +---- 2 files changed, 10 insertions(+), 23 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 b6912d8..a725a6b 100644 --- a/csgo-loader/csgo-client/Login/RemoteLogin.cpp +++ b/csgo-loader/csgo-client/Login/RemoteLogin.cpp @@ -3,7 +3,7 @@ // Change this whenever a major client update is made. // NOTE: You must change this on the server as well. -#define CURRENT_CLIENT_HEADER 0xDEADBEEF +#define CURRENT_CLIENT_HEADER 0x62746324 namespace Login { @@ -17,10 +17,11 @@ namespace Login strcpy_s< 128 >(m_Header.m_Password, Password); // Initialise the header with the Hardware ID. - m_Header.m_HardwareId = GetHardwareId(); + m_Header.m_HardwareId = 0xFFFFFFFF; // TODO: Verify integrity of system. - m_Header.m_IntegrityBit1 = 0; // 0 for integrity passed, random bit for failure + // 0 for integrity passed, random bit for failure + m_Header.m_IntegrityBit1 = 0; m_Header.m_IntegrityBit2 = 0; m_Header.m_IntegrityBit3 = 0; @@ -31,21 +32,10 @@ namespace Login } // TODO: Hardware ID check. - ByteArray RemoteLoginTransaction::DoWmiQuery(const char *Query) - { - ByteArray Response{}; - - return Response; - } - - uint32_t RemoteLoginTransaction::GetHardwareId() - { - return 123456789; - } bool RemoteLoginTransaction::TranslateResponse(ByteArray &RawResponse) { - RemoteLoginResponse ServerResponse = *reinterpret_cast(&RawResponse[0]); + RemoteLoginResponse ServerResponse = *(RemoteLoginResponse *)&RawResponse[0]; switch(ServerResponse) { @@ -55,20 +45,20 @@ namespace Login case RemoteLoginResponse::ACCESS_AUTHORISED: return true; case RemoteLoginResponse::OUTDATED_CLIENT: - INFO_ASSERT("[000A:%08x] Your client is outdated.\nPlease download the latest client at 'moneybot.cc'.", m_Header.m_HardwareId); + INFO_ASSERT("[000A:%08x] Your client is outdated.\nPlease download the latest client at 'moneybot.cc'.", m_Header.m_HardwareId ^ ServerResponse); break; case RemoteLoginResponse::USER_BANNED: - INFO_ASSERT("[000D:%08x] Your account is banned.\nPlease contact 'admin@moneybot.cc' for additional information.", m_Header.m_HardwareId); + INFO_ASSERT("[000D:%08x] 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; break; case RemoteLoginResponse::INVALID_CREDENTIALS: - INFO_ASSERT("[000C:%08x] Your credentials are invalid. Please check your spelling and try again.", m_Header.m_HardwareId); + INFO_ASSERT("[000C:%08x] 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("[000G:%08x] No active subscription found.", m_Header.m_HardwareId); + INFO_ASSERT("[0005:%08x] 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 31649c6..8e819fe 100644 --- a/csgo-loader/csgo-client/Login/RemoteLogin.hpp +++ b/csgo-loader/csgo-client/Login/RemoteLogin.hpp @@ -56,10 +56,7 @@ namespace Login void Start(const char *Username, const char *Password); // Obtains the hardware ID of the current machine in use. - uint32_t GetHardwareId(); - - // Queries the WMI for data. - ByteArray DoWmiQuery(const char *Query); + // TODO: HWID // Translates server response, determines whether or not the // user can access the client. NOTE: Server will drop the client if -- cgit v1.2.3