From ab20de7819f2330e74656677ec4c0de06904ffa2 Mon Sep 17 00:00:00 2001 From: Shxde <112267394+Shxde1@users.noreply.github.com> Date: Tue, 28 Jan 2025 19:26:46 -0500 Subject: [PATCH 1/5] Update auth.hpp --- auth.hpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/auth.hpp b/auth.hpp index 60a204a..87ed634 100644 --- a/auth.hpp +++ b/auth.hpp @@ -18,8 +18,8 @@ namespace KeyAuth { 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, bool debug = true) { - debug = debug; + api(std::string name, std::string ownerid, std::string version, std::string url, std::string path, bool debugParameter = true) { + setDebug(debugParameter); } void ban(std::string reason = ""); @@ -107,7 +107,9 @@ namespace KeyAuth { 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 debugInfo(std::string data, std::string url, std::string response, std::string headers); + + static void setDebug(bool value); void load_user_data(nlohmann::json data) { @@ -136,8 +138,10 @@ namespace KeyAuth { api::app_data.numKeys = data[XorStr("numKeys")]; api::app_data.version = data[XorStr("version")]; api::app_data.customerPanelLink = data[XorStr("customerPanelLink")]; + std::cout << data; + //api::app_data.downloadLink = data[XorStr("download")]; } - + void load_response_data(nlohmann::json data) { api::response.success = data[XorStr("success")]; api::response.message = data["message"]; From fa32c5ec76f6bf0c3cd3918bb405743b98a0086d Mon Sep 17 00:00:00 2001 From: Shxde <112267394+Shxde1@users.noreply.github.com> Date: Tue, 28 Jan 2025 19:28:57 -0500 Subject: [PATCH 2/5] Update auth.cpp --- auth.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/auth.cpp b/auth.cpp index 6902225..8b869c8 100644 --- a/auth.cpp +++ b/auth.cpp @@ -78,6 +78,7 @@ std::string signature; std::string signatureTimestamp; bool initialized; std::string API_PUBLIC_KEY = "5586b4bc69c7a4b487e4563a4cd96afd39140f919bd31cea7d1c6a1e8439422b"; +bool KeyAuth::api::debug = false; void KeyAuth::api::init() { From 089622eacd97ea8115608579097e7e369238f7a9 Mon Sep 17 00:00:00 2001 From: Shxde <112267394+Shxde1@users.noreply.github.com> Date: Tue, 28 Jan 2025 19:29:03 -0500 Subject: [PATCH 3/5] Update auth.hpp --- auth.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth.hpp b/auth.hpp index 87ed634..8744e39 100644 --- a/auth.hpp +++ b/auth.hpp @@ -107,7 +107,7 @@ namespace KeyAuth { static std::string req(std::string data, std::string url); - void debugInfo(std::string data, std::string url, std::string response, std::string headers); + static void debugInfo(std::string data, std::string url, std::string response, std::string headers); static void setDebug(bool value); From 4e7095a1d2657efdd4d60710b9ecc2cd893190c9 Mon Sep 17 00:00:00 2001 From: Shxde <112267394+Shxde1@users.noreply.github.com> Date: Tue, 28 Jan 2025 19:29:56 -0500 Subject: [PATCH 4/5] Update auth.cpp --- auth.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/auth.cpp b/auth.cpp index 8b869c8..abedaef 100644 --- a/auth.cpp +++ b/auth.cpp @@ -65,7 +65,6 @@ std::string get_str_between_two_str(const std::string& s, const std::string& sta int VerifyPayload(std::string signature, std::string timestamp, std::string body); void checkInit(); std::string checksum(); -void debugInfo(std::string data, std::string url, std::string response, std::string headers); void modify(); void runChecks(); void checkAtoms(); @@ -1660,6 +1659,10 @@ std::string get_str_between_two_str(const std::string& s, last_delim_pos - end_pos_of_first_delim); } +void KeyAuth::api::setDebug(bool value) { + KeyAuth::api::debug = value; +} + std::string KeyAuth::api::req(std::string data, std::string url) { CURL* curl = curl_easy_init(); if (!curl) From 10907859f29dad48455f570c9929d846aaa45635 Mon Sep 17 00:00:00 2001 From: Shxde <112267394+Shxde1@users.noreply.github.com> Date: Tue, 28 Jan 2025 19:30:58 -0500 Subject: [PATCH 5/5] Update auth.hpp --- auth.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/auth.hpp b/auth.hpp index 8744e39..3394e3c 100644 --- a/auth.hpp +++ b/auth.hpp @@ -138,8 +138,6 @@ namespace KeyAuth { api::app_data.numKeys = data[XorStr("numKeys")]; api::app_data.version = data[XorStr("version")]; api::app_data.customerPanelLink = data[XorStr("customerPanelLink")]; - std::cout << data; - //api::app_data.downloadLink = data[XorStr("download")]; } void load_response_data(nlohmann::json data) {