From e75220f3962e92432f6f833f316fa0b6ff55866f Mon Sep 17 00:00:00 2001
From: Shxde <112267394+Shxde1@users.noreply.github.com>
Date: Mon, 27 Jan 2025 19:39:31 -0500
Subject: [PATCH 1/3] Update library.vcxproj
---
library.vcxproj | 307 +-----------------------------------------------
1 file changed, 1 insertion(+), 306 deletions(-)
diff --git a/library.vcxproj b/library.vcxproj
index c5cdbf5..884ee9e 100644
--- a/library.vcxproj
+++ b/library.vcxproj
@@ -313,309 +313,4 @@
-
-
-
-
- Debug
- Win32
-
-
- Release
- Win32
-
-
- Debug
- x64
-
-
- Release
- x64
-
-
-
- 16.0
- Win32Proj
- {03a87d79-b6bb-4199-bd0c-97158912f6ab}
- library
- 10.0
-
-
-
- StaticLibrary
- true
- v143
- Unicode
-
-
- StaticLibrary
- false
- v143
- true
- MultiByte
-
-
- StaticLibrary
- true
- v143
- Unicode
-
-
- StaticLibrary
- false
- false
- MultiByte
- v143
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
-
-
- false
- .\libsodium;.\nlohmann;.\curl;.\;$(IncludePath)
- $(ProjectName)_x86
-
-
- true
-
-
- false
- .\libsodium;.\nlohmann;.\curl;.\;$(IncludePath)
- $(ProjectName)_x64
-
-
-
- Level3
- true
- WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
- true
- Use
- pch.h
-
-
-
-
- true
-
-
-
-
- Level3
- true
- true
- true
- CURL_STATICLIB;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)
- true
- NotUsing
- pch.h
- stdcpp17
-
-
-
-
- true
- true
- true
-
-
-
-
- Level3
- true
- _DEBUG;_LIB;%(PreprocessorDefinitions)
- true
- NotUsing
- pch.h
-
-
-
-
- true
-
-
-
-
- Level3
- true
- true
- true
- SODIUM_STATIC;CURL_STATICLIB;_CRT_SECURE_NO_WARNINGS;NDEBUG;_LIB;%(PreprocessorDefinitions)
- true
- NotUsing
- pch.h
- stdcpp17
- MultiThreadedDLL
- None
- %(AdditionalIncludeDirectories)
-
-
-
-
- true
- true
- true
-
-
- MachineX64
- libsodium.lib;libcurl.lib%(AdditionalDependencies)
- .\curl;.\libsodium;%(AdditionalLibraryDirectories)
- /NODEFAULTLIB:libcurl.lib %(AdditionalOptions)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
From c148f0e65a098f6163a34ea50cc6bf8a98a53941 Mon Sep 17 00:00:00 2001
From: Shxde <112267394+Shxde1@users.noreply.github.com>
Date: Mon, 27 Jan 2025 22:25:10 -0500
Subject: [PATCH 2/3] Update auth.cpp
---
auth.cpp | 40 ++++++----------------------------------
1 file changed, 6 insertions(+), 34 deletions(-)
diff --git a/auth.cpp b/auth.cpp
index 9789f41..6902225 100644
--- a/auth.cpp
+++ b/auth.cpp
@@ -155,13 +155,6 @@ void KeyAuth::api::init()
if ((hasher(result ^ 0xA5A5) & 0xFFFF) == (expectedHash & 0xFFFF))
{
auto json = response_decoder.parse(response);
- if (json[(XorStr("ownerid"))] != ownerid) {
- LI_FN(exit)(8);
- }
-
- std::string message = json[(XorStr("message"))];
-
- load_response_data(json);
if (json[(XorStr("ownerid"))] != ownerid) {
LI_FN(exit)(8);
@@ -188,6 +181,7 @@ void KeyAuth::api::init()
else if (json[(XorStr("message"))] == XorStr("invalidver"))
{
std::string dl = json[(XorStr("download"))];
+ api::app_data.downloadLink = json[XorStr("download")];
if (dl == "")
{
MessageBoxA(0, XorStr("Version in the loader does match the one on the dashboard, and the download link on dashboard is blank.\n\nTo fix this, either fix the loader so it matches the version on the dashboard. Or if you intended for it to have different versions, update the download link on dashboard so it will auto-update correctly.").c_str(), NULL, MB_ICONERROR);
@@ -290,26 +284,6 @@ void KeyAuth::api::login(std::string username, std::string password, std::string
file.close();
}
- std::string message = json[(XorStr("message"))];
-
- std::hash hasher;
- size_t expectedHash = hasher(68);
- size_t resultCode = hasher(json[(XorStr("code"))]);
-
- if (!json[(XorStr("success"))] || (json[(XorStr("success"))] && (resultCode == expectedHash))) {
- load_response_data(json);
- if (json[(XorStr("success"))])
- load_user_data(json[(XorStr("info"))]);
-
- if (api::response.message != XorStr("Initialized").c_str()) {
- LI_FN(GlobalAddAtomA)(seed.c_str());
-
- std::string file_path = XorStr("C:\\ProgramData\\").c_str() + seed;
- std::ofstream file(file_path);
- if (file.is_open()) {
- file << seed;
- file.close();
- }
std::string regPath = XorStr("Software\\").c_str() + seed;
HKEY hKey;
LONG result = RegCreateKeyExA(HKEY_CURRENT_USER, regPath.c_str(), 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL);
@@ -504,10 +478,6 @@ KeyAuth::api::Tfa& KeyAuth::api::Tfa::handleInput(KeyAuth::api& instance) {
instance.disable2fa(code);
}
- }
- else {
- LI_FN(exit)(7);
- }
}
void KeyAuth::api::web_login()
@@ -1873,8 +1843,6 @@ void checkRegistry() {
LI_FN(RegCloseKey)(hKey);
}
Sleep(1500); // thread interval
- Sleep(1500); // thread interval
- }
}
std::string checksum()
@@ -1921,9 +1889,13 @@ void RedactField(nlohmann::json& jsonObject, const std::string& fieldName)
}
}
-void debugInfo(std::string data, std::string url, std::string response, std::string headers) {
+void KeyAuth::api::debugInfo(std::string data, std::string url, std::string response, std::string headers) {
// output debug logs to C:\ProgramData\KeyAuth\Debug\
+ if (!KeyAuth::api::debug) {
+ return;
+ }
+
std::string redacted_response = "n/a";
// for logging the headers, since response is not avaliable there
if (response != "n/a") {
From bb3c15241625e7dfe27f424f3c35162c176402c0 Mon Sep 17 00:00:00 2001
From: Shxde <112267394+Shxde1@users.noreply.github.com>
Date: Mon, 27 Jan 2025 22:25:23 -0500
Subject: [PATCH 3/3] Update auth.hpp
---
auth.hpp | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/auth.hpp b/auth.hpp
index 53bd10e..60a204a 100644
--- a/auth.hpp
+++ b/auth.hpp
@@ -16,8 +16,11 @@ namespace KeyAuth {
public:
std::string name, ownerid, version, url, path;
+ static bool debug;
- api(std::string name, std::string ownerid, std::string version, std::string url, std::string path) : name(name), ownerid(ownerid), version(version), url(url), path(path) {}
+ api(std::string name, std::string ownerid, std::string version, std::string url, std::string path, bool debug = true) {
+ debug = debug;
+ }
void ban(std::string reason = "");
void init();
@@ -70,6 +73,7 @@ namespace KeyAuth {
std::string numKeys;
std::string version;
std::string customerPanelLink;
+ std::string downloadLink;
};
class responsedata {
@@ -102,6 +106,8 @@ namespace KeyAuth {
std::string sessionid, enckey;
static std::string req(std::string data, std::string url);
+
+ static void debugInfo(std::string data, std::string url, std::string response, std::string headers);
void load_user_data(nlohmann::json data) {
@@ -131,7 +137,7 @@ namespace KeyAuth {
api::app_data.version = data[XorStr("version")];
api::app_data.customerPanelLink = data[XorStr("customerPanelLink")];
}
-
+
void load_response_data(nlohmann::json data) {
api::response.success = data[XorStr("success")];
api::response.message = data["message"];