Replace Tadah.DLL references with Kiseki.Patcher

This commit is contained in:
rjindael 2023-07-13 18:31:17 -07:00
parent bdb3968fed
commit dceac141bf
No known key found for this signature in database
GPG Key ID: D069369C906CCF31
33 changed files with 1845 additions and 1894 deletions

View File

@ -1,25 +1,25 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.0.32014.148 VisualStudioVersion = 17.0.32014.148
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tadah.DLL", "Tadah.DLL\Tadah.DLL.vcxproj", "{9D232642-FB2F-43DC-B0AC-C56E3B691233}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Kiseki.Patcher", "Kiseki.Patcher\Kiseki.Patcher.vcxproj", "{9D232642-FB2F-43DC-B0AC-C56E3B691233}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86 Debug|x86 = Debug|x86
Release|x86 = Release|x86 Release|x86 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9D232642-FB2F-43DC-B0AC-C56E3B691233}.Debug|x86.ActiveCfg = Debug|Win32 {9D232642-FB2F-43DC-B0AC-C56E3B691233}.Debug|x86.ActiveCfg = Debug|Win32
{9D232642-FB2F-43DC-B0AC-C56E3B691233}.Debug|x86.Build.0 = Debug|Win32 {9D232642-FB2F-43DC-B0AC-C56E3B691233}.Debug|x86.Build.0 = Debug|Win32
{9D232642-FB2F-43DC-B0AC-C56E3B691233}.Release|x86.ActiveCfg = Release|Win32 {9D232642-FB2F-43DC-B0AC-C56E3B691233}.Release|x86.ActiveCfg = Release|Win32
{9D232642-FB2F-43DC-B0AC-C56E3B691233}.Release|x86.Build.0 = Release|Win32 {9D232642-FB2F-43DC-B0AC-C56E3B691233}.Release|x86.Build.0 = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {01A4798F-B42A-4C9B-BFE7-A6D1BD35C7B3} SolutionGuid = {01A4798F-B42A-4C9B-BFE7-A6D1BD35C7B3}
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

View File

@ -1,124 +1,124 @@
#include "pch.h" #include "pch.h"
#include "Discord.h" #include "Discord.h"
#ifdef PLAYER #ifdef PLAYER
bool isRunning = false; bool isRunning = false;
std::string username; std::string username;
int placeId; int placeId;
void Discord::Initialize(const std::string joinScriptUrl) void Discord::Initialize(const std::string joinScriptUrl)
{ {
std::pair<bool, std::map<std::string, std::string>> parsed = Helpers::parseURL(joinScriptUrl); std::pair<bool, std::map<std::string, std::string>> parsed = Helpers::parseURL(joinScriptUrl);
if (!parsed.first) if (!parsed.first)
{ {
return; return;
} }
if (parsed.second["query"].empty()) if (parsed.second["query"].empty())
{ {
return; return;
} }
std::map<std::string, std::string> query = Helpers::parseQueryString(parsed.second["query"]); std::map<std::string, std::string> query = Helpers::parseQueryString(parsed.second["query"]);
if (query.find("ticket") == query.end()) if (query.find("ticket") == query.end())
{ {
return; return;
} }
if (query.find("discord") == query.end()) if (query.find("discord") == query.end())
{ {
return; return;
} }
if (query["ticket"].empty()) if (query["ticket"].empty())
{ {
return; return;
} }
if (query["discord"] == "0") if (query["discord"] == "0")
{ {
return; return;
} }
// Get the username and placeId // Get the username and placeId
std::pair<bool, std::string> response = Helpers::httpGet(BASE_URL + std::string("/api/places/information?ticket=" + query["ticket"])); std::pair<bool, std::string> response = Helpers::httpGet(BASE_URL + std::string("/api/places/information?ticket=" + query["ticket"]));
if (!response.first) if (!response.first)
{ {
return; return;
} }
rapidjson::Document document; rapidjson::Document document;
document.Parse(response.second.c_str()); document.Parse(response.second.c_str());
if (document.HasParseError() || !document.HasMember("username") || !document.HasMember("placeId")) if (document.HasParseError() || !document.HasMember("username") || !document.HasMember("placeId"))
{ {
return; return;
} }
username = document["username"].GetString(); username = document["username"].GetString();
placeId = document["placeId"].GetInt(); placeId = document["placeId"].GetInt();
Discord::Update(); Discord::Update();
// Run the updater // Run the updater
std::thread updater(Discord::Update); std::thread updater(Discord::Update);
updater.join(); updater.join();
} }
void Discord::Update() void Discord::Update()
{ {
isRunning = true; isRunning = true;
while (isRunning) while (isRunning)
{ {
std::this_thread::sleep_for(std::chrono::milliseconds(60 * 1000)); std::this_thread::sleep_for(std::chrono::milliseconds(60 * 1000));
std::string title = ""; std::string title = "";
int size = 0; int size = 0;
int max = 0; int max = 0;
// Get title, size, and max // Get title, size, and max
std::pair<bool, std::string> response = Helpers::httpGet(BASE_URL + std::string("/api/places/information?id=" + placeId)); std::pair<bool, std::string> response = Helpers::httpGet(BASE_URL + std::string("/api/places/information?id=" + placeId));
if (!response.first) if (!response.first)
{ {
return; return;
} }
rapidjson::Document document; rapidjson::Document document;
document.Parse(response.second.c_str()); document.Parse(response.second.c_str());
if (document.HasParseError() || !document.HasMember("title") || !document.HasMember("size") || !document.HasMember("max")) if (document.HasParseError() || !document.HasMember("title") || !document.HasMember("size") || !document.HasMember("max"))
{ {
return; return;
} }
title = document["title"].GetString(); title = document["title"].GetString();
size = document["size"].GetInt(); size = document["size"].GetInt();
max = document["max"].GetInt(); max = document["max"].GetInt();
DiscordRichPresence presence; DiscordRichPresence presence;
memset(&presence, 0, sizeof(presence)); memset(&presence, 0, sizeof(presence));
presence.largeImageText = username.c_str(); presence.largeImageText = username.c_str();
presence.largeImageKey = "logo"; presence.largeImageKey = "logo";
presence.smallImageText = "2011"; presence.smallImageText = "2011";
presence.smallImageKey = "2011"; presence.smallImageKey = "2011";
presence.details = title.c_str(); presence.details = title.c_str();
presence.state = "In a game"; presence.state = "In a game";
presence.partySize = size; presence.partySize = size;
presence.partyMax = max; presence.partyMax = max;
} }
} }
void Discord::Cleanup() void Discord::Cleanup()
{ {
isRunning = false; isRunning = false;
Discord_Shutdown(); Discord_Shutdown();
} }
#endif #endif

View File

@ -1,211 +1,211 @@
#include "pch.h" #include "pch.h"
#include "Helpers.h" #include "Helpers.h"
#ifdef _DEBUG #ifdef _DEBUG
const std::vector<BYTE> Helpers::publicKey = Helpers::base64Decode(PUBLIC_KEY); const std::vector<BYTE> Helpers::publicKey = Helpers::base64Decode(PUBLIC_KEY);
#else #else
const std::vector<BYTE> Helpers::publicKey { PUBLIC_KEY }; const std::vector<BYTE> Helpers::publicKey { PUBLIC_KEY };
#endif #endif
const std::vector<std::string> Helpers::allowedWildcardDomains { ALLOWED_WILDCARD_DOMAINS }; const std::vector<std::string> Helpers::allowedWildcardDomains { ALLOWED_WILDCARD_DOMAINS };
const std::vector<std::string> Helpers::allowedDomains { ALLOWED_DOMAINS }; const std::vector<std::string> Helpers::allowedDomains { ALLOWED_DOMAINS };
const std::vector<std::string> Helpers::allowedSchemes { ALLOWED_SCHEMES }; const std::vector<std::string> Helpers::allowedSchemes { ALLOWED_SCHEMES };
const std::vector<std::string> Helpers::allowedEmbeddedSchemes { ALLOWED_EMBEDDED_SCHEMES }; const std::vector<std::string> Helpers::allowedEmbeddedSchemes { ALLOWED_EMBEDDED_SCHEMES };
// https://stackoverflow.com/questions/48212992/how-to-find-out-if-there-is-any-non-ascii-character-in-a-string-with-a-file-path // https://stackoverflow.com/questions/48212992/how-to-find-out-if-there-is-any-non-ascii-character-in-a-string-with-a-file-path
bool Helpers::isASCII(const std::string& s) bool Helpers::isASCII(const std::string& s)
{ {
return !std::any_of(s.begin(), s.end(), [](char c) { return !std::any_of(s.begin(), s.end(), [](char c) {
return static_cast<unsigned char>(c) > 127; return static_cast<unsigned char>(c) > 127;
}); });
} }
// https://stackoverflow.com/questions/313970/how-to-convert-an-instance-of-stdstring-to-lower-case // https://stackoverflow.com/questions/313970/how-to-convert-an-instance-of-stdstring-to-lower-case
std::string Helpers::toLower(std::string s) std::string Helpers::toLower(std::string s)
{ {
std::transform(s.begin(), s.end(), s.begin(), [](unsigned char c) { return std::tolower(c); }); std::transform(s.begin(), s.end(), s.begin(), [](unsigned char c) { return std::tolower(c); });
return s; return s;
} }
// https://stackoverflow.com/a/44562527 // https://stackoverflow.com/a/44562527
std::vector<BYTE> Helpers::base64Decode(const std::string_view data) std::vector<BYTE> Helpers::base64Decode(const std::string_view data)
{ {
// table from '+' to 'z' // table from '+' to 'z'
const uint8_t lookup[] = { const uint8_t lookup[] = {
62, 255, 62, 255, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 62, 255, 62, 255, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255,
255, 0, 255, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 255, 0, 255, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
255, 255, 255, 255, 63, 255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 255, 255, 255, 255, 63, 255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51
}; };
static_assert(sizeof(lookup) == 'z' - '+' + 1); static_assert(sizeof(lookup) == 'z' - '+' + 1);
std::vector<unsigned char> out; std::vector<unsigned char> out;
int val = 0, valb = -8; int val = 0, valb = -8;
for (uint8_t c : data) for (uint8_t c : data)
{ {
if (c < '+' || c > 'z') if (c < '+' || c > 'z')
{ {
break; break;
} }
c -= '+'; c -= '+';
if (lookup[c] >= 64) if (lookup[c] >= 64)
{ {
break; break;
} }
val = (val << 6) + lookup[c]; val = (val << 6) + lookup[c];
valb += 6; valb += 6;
if (valb >= 0) if (valb >= 0)
{ {
out.push_back(char((val >> valb) & 0xFF)); out.push_back(char((val >> valb) & 0xFF));
valb -= 8; valb -= 8;
} }
} }
return out; return out;
} }
// https://stackoverflow.com/a/28269049 // https://stackoverflow.com/a/28269049
std::map<std::string, std::string> Helpers::parseQueryString(const std::string query) std::map<std::string, std::string> Helpers::parseQueryString(const std::string query)
{ {
std::istringstream stream(query); std::istringstream stream(query);
std::map<std::string, std::string> parsed; std::map<std::string, std::string> parsed;
std::string pair, key, value; std::string pair, key, value;
while (std::getline(stream, pair, '&')) // split each term while (std::getline(stream, pair, '&')) // split each term
{ {
std::istringstream term(pair); std::istringstream term(pair);
if (std::getline(std::getline(term, key, '='), value)) if (std::getline(std::getline(term, key, '='), value))
{ {
parsed[key] = value; parsed[key] = value;
} }
} }
return parsed; return parsed;
} }
std::string Helpers::joinQueryString(const std::map<std::string, std::string> query) std::string Helpers::joinQueryString(const std::map<std::string, std::string> query)
{ {
std::stringstream stream; std::stringstream stream;
stream << "?"; stream << "?";
for (auto const& pair : query) for (auto const& pair : query)
{ {
stream << pair.first << "=" << pair.second << "&"; stream << pair.first << "=" << pair.second << "&";
} }
std::string result = stream.str(); std::string result = stream.str();
result.pop_back(); // remove ending ampersand result.pop_back(); // remove ending ampersand
return result; return result;
} }
// https://stackoverflow.com/a/12097772 // https://stackoverflow.com/a/12097772
std::string Helpers::ws2s(const std::wstring widestring) std::string Helpers::ws2s(const std::wstring widestring)
{ {
std::string string; std::string string;
std::transform(widestring.begin(), widestring.end(), std::back_inserter(string), [](wchar_t c) { std::transform(widestring.begin(), widestring.end(), std::back_inserter(string), [](wchar_t c) {
return (char)c; return (char)c;
}); });
return string; return string;
} }
size_t Helpers::write(char* contents, size_t size, size_t memory, void* pointer) size_t Helpers::write(char* contents, size_t size, size_t memory, void* pointer)
{ {
((std::string*)pointer)->append((char*)contents, size * memory); ((std::string*)pointer)->append((char*)contents, size * memory);
return size * memory; return size * memory;
} }
std::string Helpers::getModulePath() std::string Helpers::getModulePath()
{ {
char buffer[MAX_PATH]; char buffer[MAX_PATH];
GetModuleFileNameA(NULL, buffer, MAX_PATH); GetModuleFileNameA(NULL, buffer, MAX_PATH);
return std::string(buffer); return std::string(buffer);
} }
std::string Helpers::getISOTimestamp() std::string Helpers::getISOTimestamp()
{ {
time_t now = time(0); time_t now = time(0);
struct tm now_gmt {}; struct tm now_gmt {};
gmtime_s(&now_gmt, &now); gmtime_s(&now_gmt, &now);
char buffer[20]; char buffer[20];
strftime(buffer, sizeof(buffer), "%FT%TZ", &now_gmt); strftime(buffer, sizeof(buffer), "%FT%TZ", &now_gmt);
return std::string(buffer); return std::string(buffer);
} }
std::pair<bool, std::map<std::string, std::string>> Helpers::parseURL(const std::string url) std::pair<bool, std::map<std::string, std::string>> Helpers::parseURL(const std::string url)
{ {
CURLU* curl = curl_url(); CURLU* curl = curl_url();
CURLUcode result = curl_url_set(curl, CURLUPART_URL, url.c_str(), 0); CURLUcode result = curl_url_set(curl, CURLUPART_URL, url.c_str(), 0);
std::map<std::string, std::string> map; std::map<std::string, std::string> map;
bool success = false; bool success = false;
if (result == CURLE_OK) if (result == CURLE_OK)
{ {
success = true; success = true;
char* path; char* path;
char* host; char* host;
char* query; char* query;
curl_url_get(curl, CURLUPART_PATH, &path, 0); curl_url_get(curl, CURLUPART_PATH, &path, 0);
curl_url_get(curl, CURLUPART_HOST, &host, 0); curl_url_get(curl, CURLUPART_HOST, &host, 0);
curl_url_get(curl, CURLUPART_QUERY, &query, 0); curl_url_get(curl, CURLUPART_QUERY, &query, 0);
curl_url_cleanup(curl); curl_url_cleanup(curl);
map = { map = {
{ "path", std::string(path) }, { "path", std::string(path) },
{ "host", std::string(host) }, { "host", std::string(host) },
{ "query", std::string(query) } { "query", std::string(query) }
}; };
curl_free(path); curl_free(path);
curl_free(host); curl_free(host);
curl_free(query); curl_free(query);
} }
return std::make_pair(success, map); return std::make_pair(success, map);
} }
std::pair<bool, std::string> Helpers::httpGet(const std::string url) std::pair<bool, std::string> Helpers::httpGet(const std::string url)
{ {
bool success = false; bool success = false;
std::string data; std::string data;
CURL* curl = curl_easy_init(); CURL* curl = curl_easy_init();
CURLcode result; CURLcode result;
long response = 0; long response = 0;
if (!curl) if (!curl)
{ {
return std::make_pair(false, ""); return std::make_pair(false, "");
} }
curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, Helpers::write); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, Helpers::write);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &data); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &data);
result = curl_easy_perform(curl); result = curl_easy_perform(curl);
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response); curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
curl_easy_cleanup(curl); curl_easy_cleanup(curl);
if (result != CURLE_OK || response != 200) if (result != CURLE_OK || response != 200)
{ {
return std::make_pair(false, ""); return std::make_pair(false, "");
} }
return std::make_pair(true, data); return std::make_pair(true, data);
} }

View File

@ -1,150 +1,150 @@
#include "pch.h" #include "pch.h"
#include "Hooks/CRoblox.h" #include "Hooks/CRoblox.h"
#ifdef SERVER #ifdef SERVER
#include "Server.h" #include "Server.h"
#endif #endif
bool hasAuthenticationUrl = false; bool hasAuthenticationUrl = false;
bool hasAuthenticationTicket = false; bool hasAuthenticationTicket = false;
bool hasJoinScriptUrl = false; bool hasJoinScriptUrl = false;
bool hasJobId = false; bool hasJobId = false;
std::wstring authenticationUrl; std::wstring authenticationUrl;
std::wstring authenticationTicket; std::wstring authenticationTicket;
std::wstring joinScriptUrl; std::wstring joinScriptUrl;
std::wstring jobId; std::wstring jobId;
CRobloxApp__InitInstance_t CRobloxApp__InitInstance = (CRobloxApp__InitInstance_t)ADDRESS_CROBLOXAPP__INITINSTANCE; CRobloxApp__InitInstance_t CRobloxApp__InitInstance = (CRobloxApp__InitInstance_t)ADDRESS_CROBLOXAPP__INITINSTANCE;
CRobloxCommandLineInfo__ParseParam_t CRobloxCommandLineInfo__ParseParam = (CRobloxCommandLineInfo__ParseParam_t)ADDRESS_CROBLOXCOMMANDLINEINFO__PARSEPARAM; CRobloxCommandLineInfo__ParseParam_t CRobloxCommandLineInfo__ParseParam = (CRobloxCommandLineInfo__ParseParam_t)ADDRESS_CROBLOXCOMMANDLINEINFO__PARSEPARAM;
BOOL __fastcall CRobloxApp__InitInstance_hook(CRobloxApp* _this) BOOL __fastcall CRobloxApp__InitInstance_hook(CRobloxApp* _this)
{ {
if (!CRobloxApp__InitInstance(_this)) if (!CRobloxApp__InitInstance(_this))
{ {
return FALSE; return FALSE;
} }
CApp* app = reinterpret_cast<CApp*>(CLASSLOCATION_CAPP); CApp* app = reinterpret_cast<CApp*>(CLASSLOCATION_CAPP);
if (hasAuthenticationUrl && hasAuthenticationTicket && !authenticationUrl.empty() && !authenticationTicket.empty()) if (hasAuthenticationUrl && hasAuthenticationTicket && !authenticationUrl.empty() && !authenticationTicket.empty())
{ {
CApp__RobloxAuthenticate(app, nullptr, authenticationUrl.c_str(), authenticationTicket.c_str()); CApp__RobloxAuthenticate(app, nullptr, authenticationUrl.c_str(), authenticationTicket.c_str());
} }
if (hasJoinScriptUrl && !joinScriptUrl.empty()) if (hasJoinScriptUrl && !joinScriptUrl.empty())
{ {
try try
{ {
CRobloxDoc* document = CRobloxApp__CreateDocument(_this); CRobloxDoc* document = CRobloxApp__CreateDocument(_this);
CWorkspace__ExecUrlScript(document->workspace, joinScriptUrl.c_str(), VARIANT(), VARIANT(), VARIANT(), VARIANT(), nullptr); CWorkspace__ExecUrlScript(document->workspace, joinScriptUrl.c_str(), VARIANT(), VARIANT(), VARIANT(), VARIANT(), nullptr);
} }
catch (std::runtime_error) catch (std::runtime_error)
{ {
return FALSE; return FALSE;
} }
} }
#ifdef PLAYER #ifdef PLAYER
if (!hasAuthenticationUrl || !hasAuthenticationTicket || !hasJoinScriptUrl) if (!hasAuthenticationUrl || !hasAuthenticationTicket || !hasJoinScriptUrl)
{ {
return FALSE; return FALSE;
} }
#endif #endif
#ifdef SERVER #ifdef SERVER
if (!hasAuthenticationUrl || !hasAuthenticationTicket || !hasJoinScriptUrl || !hasJobId) if (!hasAuthenticationUrl || !hasAuthenticationTicket || !hasJoinScriptUrl || !hasJobId)
{ {
ShellExecute(0, 0, L"https://tadah.rocks/games", 0, 0, SW_SHOW); ShellExecute(0, 0, L"https://kiseki.lol/games", 0, 0, SW_SHOW);
return FALSE; return FALSE;
} }
#endif #endif
return TRUE; return TRUE;
} }
void __fastcall CRobloxCommandLineInfo__ParseParam_hook(CRobloxCommandLineInfo* _this, void*, const char* pszParam, BOOL bFlag, BOOL bLast) void __fastcall CRobloxCommandLineInfo__ParseParam_hook(CRobloxCommandLineInfo* _this, void*, const char* pszParam, BOOL bFlag, BOOL bLast)
{ {
if (hasJoinScriptUrl && joinScriptUrl.empty()) if (hasJoinScriptUrl && joinScriptUrl.empty())
{ {
int size = MultiByteToWideChar(CP_ACP, 0, pszParam, strlen(pszParam), nullptr, 0); int size = MultiByteToWideChar(CP_ACP, 0, pszParam, strlen(pszParam), nullptr, 0);
joinScriptUrl.resize(size); joinScriptUrl.resize(size);
MultiByteToWideChar(CP_ACP, 0, pszParam, strlen(pszParam), &joinScriptUrl[0], size); MultiByteToWideChar(CP_ACP, 0, pszParam, strlen(pszParam), &joinScriptUrl[0], size);
_this->m_bRunAutomated = TRUE; _this->m_bRunAutomated = TRUE;
CCommandLineInfo__ParseLast(_this, bLast); CCommandLineInfo__ParseLast(_this, bLast);
#ifdef PLAYER #ifdef PLAYER
Discord::Initialize(Helpers::ws2s(joinScriptUrl)); Discord::Initialize(Helpers::ws2s(joinScriptUrl));
#endif #endif
} }
if (hasAuthenticationUrl && authenticationUrl.empty()) if (hasAuthenticationUrl && authenticationUrl.empty())
{ {
int size = MultiByteToWideChar(CP_ACP, 0, pszParam, strlen(pszParam), nullptr, 0); int size = MultiByteToWideChar(CP_ACP, 0, pszParam, strlen(pszParam), nullptr, 0);
authenticationUrl.resize(size); authenticationUrl.resize(size);
MultiByteToWideChar(CP_ACP, 0, pszParam, strlen(pszParam), &authenticationUrl[0], size); MultiByteToWideChar(CP_ACP, 0, pszParam, strlen(pszParam), &authenticationUrl[0], size);
CCommandLineInfo__ParseLast(_this, bLast); CCommandLineInfo__ParseLast(_this, bLast);
return; return;
} }
if (hasAuthenticationTicket && authenticationTicket.empty()) if (hasAuthenticationTicket && authenticationTicket.empty())
{ {
int size = MultiByteToWideChar(CP_ACP, 0, pszParam, strlen(pszParam), nullptr, 0); int size = MultiByteToWideChar(CP_ACP, 0, pszParam, strlen(pszParam), nullptr, 0);
authenticationTicket.resize(size); authenticationTicket.resize(size);
MultiByteToWideChar(CP_ACP, 0, pszParam, strlen(pszParam), &authenticationTicket[0], size); MultiByteToWideChar(CP_ACP, 0, pszParam, strlen(pszParam), &authenticationTicket[0], size);
CCommandLineInfo__ParseLast(_this, bLast); CCommandLineInfo__ParseLast(_this, bLast);
return; return;
} }
#ifdef SERVER #ifdef SERVER
if (hasJobId && jobId.empty()) if (hasJobId && jobId.empty())
{ {
int size = MultiByteToWideChar(CP_ACP, 0, pszParam, strlen(pszParam), nullptr, 0); int size = MultiByteToWideChar(CP_ACP, 0, pszParam, strlen(pszParam), nullptr, 0);
jobId.resize(size); jobId.resize(size);
MultiByteToWideChar(CP_ACP, 0, pszParam, strlen(pszParam), &jobId[0], size); MultiByteToWideChar(CP_ACP, 0, pszParam, strlen(pszParam), &jobId[0], size);
CCommandLineInfo__ParseLast(_this, bLast); CCommandLineInfo__ParseLast(_this, bLast);
return; return;
} }
#endif #endif
if (bFlag && _stricmp(pszParam, "a") == 0) if (bFlag && _stricmp(pszParam, "a") == 0)
{ {
hasAuthenticationUrl = true; hasAuthenticationUrl = true;
CCommandLineInfo__ParseLast(_this, bLast); CCommandLineInfo__ParseLast(_this, bLast);
return; return;
} }
if (bFlag && _stricmp(pszParam, "t") == 0) if (bFlag && _stricmp(pszParam, "t") == 0)
{ {
hasAuthenticationTicket = true; hasAuthenticationTicket = true;
CCommandLineInfo__ParseLast(_this, bLast); CCommandLineInfo__ParseLast(_this, bLast);
return; return;
} }
if (bFlag && _stricmp(pszParam, "j") == 0) if (bFlag && _stricmp(pszParam, "j") == 0)
{ {
hasJoinScriptUrl = true; hasJoinScriptUrl = true;
CCommandLineInfo__ParseLast(_this, bLast); CCommandLineInfo__ParseLast(_this, bLast);
return; return;
} }
#ifdef SERVER #ifdef SERVER
if (bFlag && _stricmp(pszParam, "jobId") == 0) if (bFlag && _stricmp(pszParam, "jobId") == 0)
{ {
hasJobId = true; hasJobId = true;
CCommandLineInfo__ParseLast(_this, bLast); CCommandLineInfo__ParseLast(_this, bLast);
Server::Initialize(jobId); Server::Initialize(jobId);
return; return;
} }
#endif #endif
CRobloxCommandLineInfo__ParseParam(_this, pszParam, bFlag, bLast); CRobloxCommandLineInfo__ParseParam(_this, pszParam, bFlag, bLast);
} }

View File

@ -1,27 +1,27 @@
#include "pch.h" #include "pch.h"
#include "Helpers.h" #include "Helpers.h"
#include "Hooks/Context.h" #include "Hooks/Context.h"
#ifdef _DEBUG #ifdef _DEBUG
Context__requirePermission_t Context__requirePermission = (Context__requirePermission_t)ADDRESS_CONTEXT__REQUIREPERMISSION; Context__requirePermission_t Context__requirePermission = (Context__requirePermission_t)ADDRESS_CONTEXT__REQUIREPERMISSION;
void __fastcall Context__requirePermission_hook(void* _this, void*, int permission, const char* operation) void __fastcall Context__requirePermission_hook(void* _this, void*, int permission, const char* operation)
{ {
int identity = ((int*)_this)[0]; int identity = ((int*)_this)[0];
if (!Context__isInRole(identity, permission)) if (!Context__isInRole(identity, permission))
{ {
if (operation != 0) if (operation != 0)
{ {
throw std::runtime_error("The current identity (" + std::to_string(identity) + ") cannot " + std::string(operation) + " (requires " + std::to_string(permission) + ")"); throw std::runtime_error("The current identity (" + std::to_string(identity) + ") cannot " + std::string(operation) + " (requires " + std::to_string(permission) + ")");
} }
else else
{ {
throw std::runtime_error("The current identity (" + std::to_string(identity) + ") cannot perform the requested operation (requires " + std::to_string(permission) + ")"); throw std::runtime_error("The current identity (" + std::to_string(identity) + ") cannot perform the requested operation (requires " + std::to_string(permission) + ")");
} }
} }
} }
#endif #endif

View File

@ -1,131 +1,131 @@
#include "pch.h" #include "pch.h"
#include "Patches.h" #include "Patches.h"
#include "Helpers.h" #include "Helpers.h"
#include "Hooks/Crypt.h" #include "Hooks/Crypt.h"
Crypt::Crypt() Crypt::Crypt()
{ {
if (!CryptAcquireContext(&context, NULL, MS_ENH_RSA_AES_PROV, PROV_RSA_AES, CRYPT_VERIFYCONTEXT)) if (!CryptAcquireContext(&context, NULL, MS_ENH_RSA_AES_PROV, PROV_RSA_AES, CRYPT_VERIFYCONTEXT))
{ {
if (::GetLastError() == NTE_BAD_KEYSET) if (::GetLastError() == NTE_BAD_KEYSET)
{ {
if (!CryptAcquireContext(&context, NULL, MS_ENH_RSA_AES_PROV, PROV_RSA_AES, CRYPT_VERIFYCONTEXT | CRYPT_NEWKEYSET)) if (!CryptAcquireContext(&context, NULL, MS_ENH_RSA_AES_PROV, PROV_RSA_AES, CRYPT_VERIFYCONTEXT | CRYPT_NEWKEYSET))
{ {
throw std::runtime_error("Error during CryptAcquireContext 2\n"); throw std::runtime_error("Error during CryptAcquireContext 2\n");
} }
} }
else else
{ {
throw std::runtime_error("Error during CryptAcquireContext\n"); throw std::runtime_error("Error during CryptAcquireContext\n");
} }
} }
try try
{ {
BYTE* blob = new BYTE[Helpers::publicKey.size()]; BYTE* blob = new BYTE[Helpers::publicKey.size()];
std::copy(Helpers::publicKey.begin(), Helpers::publicKey.end(), blob); std::copy(Helpers::publicKey.begin(), Helpers::publicKey.end(), blob);
if (!CryptImportKey(context, blob, Helpers::publicKey.size(), 0, 0, &key)) if (!CryptImportKey(context, blob, Helpers::publicKey.size(), 0, 0, &key))
{ {
throw std::runtime_error(""); throw std::runtime_error("");
} }
} }
catch (...) catch (...)
{ {
#ifdef _DEBUG #ifdef _DEBUG
throw std::runtime_error("Failed to import public key"); throw std::runtime_error("Failed to import public key");
#else #else
throw std::runtime_error("Error during CryptImportKey"); throw std::runtime_error("Error during CryptImportKey");
#endif #endif
} }
} }
Crypt::~Crypt() Crypt::~Crypt()
{ {
CryptDestroyKey(key); CryptDestroyKey(key);
CryptReleaseContext(context, 0); CryptReleaseContext(context, 0);
} }
bool Crypt::verifySignatureBase64(std::string message, std::string signatureBase64, ALG_ID algorithm = CALG_SHA_256) bool Crypt::verifySignatureBase64(std::string message, std::string signatureBase64, ALG_ID algorithm = CALG_SHA_256)
{ {
// Check for a reasonable signature length before verifying // Check for a reasonable signature length before verifying
if (signatureBase64.length() > 4096) if (signatureBase64.length() > 4096)
{ {
return false; return false;
} }
HCRYPTHASH hash; HCRYPTHASH hash;
if (!CryptCreateHash(context, algorithm, NULL, 0, &hash)) if (!CryptCreateHash(context, algorithm, NULL, 0, &hash))
{ {
throw std::runtime_error(""); throw std::runtime_error("");
} }
try try
{ {
if (!CryptHashData(hash, (BYTE*)message.c_str(), message.size(), 0)) if (!CryptHashData(hash, (BYTE*)message.c_str(), message.size(), 0))
{ {
return false; return false;
} }
std::vector<BYTE> signature = Helpers::base64Decode(signatureBase64); std::vector<BYTE> signature = Helpers::base64Decode(signatureBase64);
/* /*
The native cryptography API uses little-endian byte order The native cryptography API uses little-endian byte order
while OpenSSL uses big-endian byte order. while OpenSSL uses big-endian byte order.
If you are verifying a signature generated by using a OpenSSL API If you are verifying a signature generated by using a OpenSSL API
(or similar), you must swap the order of signature bytes before (or similar), you must swap the order of signature bytes before
calling the CryptVerifySignature function to verify the signature. calling the CryptVerifySignature function to verify the signature.
*/ */
std::reverse(signature.begin(), signature.end()); std::reverse(signature.begin(), signature.end());
BYTE* signatureData = new BYTE[signature.size()]; BYTE* signatureData = new BYTE[signature.size()];
std::copy(signature.begin(), signature.end(), signatureData); std::copy(signature.begin(), signature.end(), signatureData);
if (!CryptVerifySignature(hash, signatureData, signature.size(), key, NULL, 0)) if (!CryptVerifySignature(hash, signatureData, signature.size(), key, NULL, 0))
{ {
return false; return false;
} }
} }
catch (...) catch (...)
{ {
::CryptDestroyHash(hash); ::CryptDestroyHash(hash);
return false; return false;
} }
::CryptDestroyHash(hash); ::CryptDestroyHash(hash);
return true; return true;
} }
Crypt__verifySignatureBase64_t Crypt__verifySignatureBase64 = (Crypt__verifySignatureBase64_t)ADDRESS_CRYPT__VERIFYSIGNATUREBASE64; Crypt__verifySignatureBase64_t Crypt__verifySignatureBase64 = (Crypt__verifySignatureBase64_t)ADDRESS_CRYPT__VERIFYSIGNATUREBASE64;
// Crypt::verifySignatureBase64(std::string message, std::string signatureBase64) // Crypt::verifySignatureBase64(std::string message, std::string signatureBase64)
void __fastcall Crypt__verifySignatureBase64_hook(HCRYPTPROV* _this, void*, int a2, BYTE* pbData, int a4, int a5, int a6, DWORD dwDataLen, int a8, int a9, int a10, int a11, int a12, int a13, int a14, int a15) void __fastcall Crypt__verifySignatureBase64_hook(HCRYPTPROV* _this, void*, int a2, BYTE* pbData, int a4, int a5, int a6, DWORD dwDataLen, int a8, int a9, int a10, int a11, int a12, int a13, int a14, int a15)
{ {
// We have to reconstruct the parameters by hand since using the original function signature causes crashes // We have to reconstruct the parameters by hand since using the original function signature causes crashes
std::string message; std::string message;
std::string signatureBase64; std::string signatureBase64;
// Get message // Get message
message = std::string(reinterpret_cast<const char*>(pbData), dwDataLen); message = std::string(reinterpret_cast<const char*>(pbData), dwDataLen);
// Get signatureBase64 // Get signatureBase64
int* v21 = (int*)a10; int* v21 = (int*)a10;
if ((unsigned int)a15 < 0x10) if ((unsigned int)a15 < 0x10)
{ {
v21 = &a10; v21 = &a10;
} }
signatureBase64 = std::string(reinterpret_cast<const char*>(v21), a14); signatureBase64 = std::string(reinterpret_cast<const char*>(v21), a14);
// Verify signature // Verify signature
if (!Crypt().verifySignatureBase64(message, signatureBase64, CALG_SHA_256)) if (!Crypt().verifySignatureBase64(message, signatureBase64, CALG_SHA_256))
{ {
throw std::runtime_error(""); throw std::runtime_error("");
} }
} }

View File

@ -1,22 +1,22 @@
#include "pch.h" #include "pch.h"
#include "Hooks/DataModel.h" #include "Hooks/DataModel.h"
#ifdef SERVER #ifdef SERVER
bool setJobId = false; bool setJobId = false;
DataModel__getJobId_t DataModel__getJobId = (DataModel__getJobId_t)ADDRESS_DATAMODEL__GETJOBID; DataModel__getJobId_t DataModel__getJobId = (DataModel__getJobId_t)ADDRESS_DATAMODEL__GETJOBID;
int __fastcall DataModel__getJobId_hook(DataModel* _this, void*, int a2) int __fastcall DataModel__getJobId_hook(DataModel* _this, void*, int a2)
{ {
if (!setJobId && hasJobId && !jobId.empty()) if (!setJobId && hasJobId && !jobId.empty())
{ {
_this->jobId = Helpers::ws2s(jobId); _this->jobId = Helpers::ws2s(jobId);
setJobId = true; setJobId = true;
} }
return DataModel__getJobId(_this, a2); return DataModel__getJobId(_this, a2);
} }
#endif #endif

View File

@ -1,149 +1,149 @@
#include "pch.h" #include "pch.h"
#include "Hooks/Http.h" #include "Hooks/Http.h"
#define CHECK(condition, code) \ #define CHECK(condition, code) \
if(!error) { \ if(!error) { \
if ((condition)) { \ if ((condition)) { \
error = code; \ error = code; \
} \ } \
} }
Http__httpGetPostWinInet_t Http__httpGetPostWinInet = (Http__httpGetPostWinInet_t)ADDRESS_HTTP__HTTPGETPOSTWININET; Http__httpGetPostWinInet_t Http__httpGetPostWinInet = (Http__httpGetPostWinInet_t)ADDRESS_HTTP__HTTPGETPOSTWININET;
Http__trustCheck_t Http__trustCheck = (Http__trustCheck_t)ADDRESS_HTTP__TRUSTCHECK; Http__trustCheck_t Http__trustCheck = (Http__trustCheck_t)ADDRESS_HTTP__TRUSTCHECK;
void __fastcall Http__httpGetPostWinInet_hook(Http* _this, void*, bool isPost, int a3, bool compressData, LPCSTR additionalHeaders, int a6) void __fastcall Http__httpGetPostWinInet_hook(Http* _this, void*, bool isPost, int a3, bool compressData, LPCSTR additionalHeaders, int a6)
{ {
std::pair<bool, std::map<std::string, std::string>> parsed = Helpers::parseURL(_this->url); std::pair<bool, std::map<std::string, std::string>> parsed = Helpers::parseURL(_this->url);
Http _changed = *_this; Http _changed = *_this;
if (parsed.first) if (parsed.first)
{ {
std::map<std::string, std::string> url = parsed.second; std::map<std::string, std::string> url = parsed.second;
if (!url["path"].empty() && !url["host"].empty() && !url["query"].empty()) if (!url["path"].empty() && !url["host"].empty() && !url["query"].empty())
{ {
url["path"] = Helpers::toLower(url["path"]); url["path"] = Helpers::toLower(url["path"]);
if (url["host"] == "roblox.com" || url["host"] == "www.roblox.com") if (url["host"] == "roblox.com" || url["host"] == "www.roblox.com")
{ {
if (url["path"] == "/asset" || url["path"] == "/asset/" || url["path"] == "/asset/default.ashx") if (url["path"] == "/asset" || url["path"] == "/asset/" || url["path"] == "/asset/default.ashx")
{ {
_changed.url = "https://assetdelivery.roblox.com/v1/asset/?" + url["query"]; _changed.url = "https://assetdelivery.roblox.com/v1/asset/?" + url["query"];
_this = &_changed; _this = &_changed;
} }
else if (url["path"] == "/thumbs/asset.ashx" || url["path"] == "/thumbs/avatar.ashx") else if (url["path"] == "/thumbs/asset.ashx" || url["path"] == "/thumbs/avatar.ashx")
{ {
std::string api = "https://www.roblox.com/" + std::string(url["path"] == "/thumbs/asset.ashx" ? "asset" : "avatar") + "/request-thumbnail-fix"; std::string api = "https://www.roblox.com/" + std::string(url["path"] == "/thumbs/asset.ashx" ? "asset" : "avatar") + "/request-thumbnail-fix";
std::map<std::string, std::string> source = Helpers::parseQueryString(url["query"]); std::map<std::string, std::string> source = Helpers::parseQueryString(url["query"]);
std::map<std::string, std::string> fixed = { std::map<std::string, std::string> fixed = {
{ url["path"] == "/thumbs/asset.ashx" ? "overrideModeration" : "dummy", "false" }, { url["path"] == "/thumbs/asset.ashx" ? "overrideModeration" : "dummy", "false" },
{ "thumbnailFormatId", "0" } { "thumbnailFormatId", "0" }
}; };
for (auto& pair : source) for (auto& pair : source)
{ {
fixed[Helpers::toLower(pair.first)] = pair.second; fixed[Helpers::toLower(pair.first)] = pair.second;
} }
if (fixed.find("id") != fixed.end()) if (fixed.find("id") != fixed.end())
{ {
auto handler = fixed.extract("id"); auto handler = fixed.extract("id");
handler.key() = url["path"] == "/thumbs/asset.ashx" ? "assetId" : "userId"; handler.key() = url["path"] == "/thumbs/asset.ashx" ? "assetId" : "userId";
fixed.insert(std::move(handler)); fixed.insert(std::move(handler));
} }
api += Helpers::joinQueryString(fixed); api += Helpers::joinQueryString(fixed);
// Get the API response // Get the API response
std::pair<bool, std::string> response = Helpers::httpGet(api); std::pair<bool, std::string> response = Helpers::httpGet(api);
if (!response.first) if (!response.first)
{ {
throw std::runtime_error("Unexpected error occurred when fetching Roblox API: 0x0"); throw std::runtime_error("Unexpected error occurred when fetching Roblox API: 0x0");
} }
std::string data = response.second; std::string data = response.second;
rapidjson::Document document; rapidjson::Document document;
document.Parse(data.c_str()); document.Parse(data.c_str());
int error = 0; int error = 0;
CHECK(document.HasParseError(), 0x01); CHECK(document.HasParseError(), 0x01);
CHECK(!document.HasMember("d"), 0x02); CHECK(!document.HasMember("d"), 0x02);
CHECK(!document["d"].IsObject(), 0x03); CHECK(!document["d"].IsObject(), 0x03);
CHECK(!document["d"].HasMember("url"), 0x04); CHECK(!document["d"].HasMember("url"), 0x04);
CHECK(!document["d"]["url"].IsString(), 0x05); CHECK(!document["d"]["url"].IsString(), 0x05);
if (error != 0) if (error != 0)
{ {
throw std::runtime_error("Unexpected error occurred when fetching Roblox API: 0x0" + std::to_string(error)); throw std::runtime_error("Unexpected error occurred when fetching Roblox API: 0x0" + std::to_string(error));
} }
_changed.url = document["d"]["url"].GetString(); _changed.url = document["d"]["url"].GetString();
_this = &_changed; _this = &_changed;
} }
} }
} }
} }
#ifdef SERVER #ifdef SERVER
if (Server::Handle) if (Server::Handle)
{ {
Server::Log::Http((RequestType)isPost, _this->url); Server::Log::Http((RequestType)isPost, _this->url);
} }
#endif #endif
Http__httpGetPostWinInet(_this, isPost, a3, compressData, additionalHeaders, a6); Http__httpGetPostWinInet(_this, isPost, a3, compressData, additionalHeaders, a6);
} }
bool __fastcall Http__trustCheck_hook(const char* url) bool __fastcall Http__trustCheck_hook(const char* url)
{ {
if (strlen(url) == 7 && !Helpers::isASCII(url)) if (strlen(url) == 7 && !Helpers::isASCII(url))
{ {
url = ((char**)url)[0]; url = ((char**)url)[0];
} }
std::string _url = std::string(url); std::string _url = std::string(url);
if (_url == "about:blank") if (_url == "about:blank")
{ {
return true; return true;
} }
for (std::string allowedEmbeddedScheme : Helpers::allowedEmbeddedSchemes) for (std::string allowedEmbeddedScheme : Helpers::allowedEmbeddedSchemes)
{ {
if (_url.rfind(allowedEmbeddedScheme + ":", 0) == 0) if (_url.rfind(allowedEmbeddedScheme + ":", 0) == 0)
{ {
return true; return true;
} }
} }
std::pair<bool, std::map<std::string, std::string>> result = Helpers::parseURL(url); std::pair<bool, std::map<std::string, std::string>> result = Helpers::parseURL(url);
if (!result.first) if (!result.first)
{ {
return false; return false;
} }
std::map<std::string, std::string> parsed = result.second; std::map<std::string, std::string> parsed = result.second;
if (!parsed["scheme"].empty() && !parsed["host"].empty()) if (!parsed["scheme"].empty() && !parsed["host"].empty())
{ {
if (std::find(Helpers::allowedSchemes.begin(), Helpers::allowedSchemes.end(), std::string(parsed["scheme"])) != Helpers::allowedSchemes.end()) if (std::find(Helpers::allowedSchemes.begin(), Helpers::allowedSchemes.end(), std::string(parsed["scheme"])) != Helpers::allowedSchemes.end())
{ {
for (std::string wildcard : Helpers::allowedWildcardDomains) for (std::string wildcard : Helpers::allowedWildcardDomains)
{ {
if (parsed["host"].size() >= wildcard.size() && 0 == wildcard.compare(parsed["host"].size() - wildcard.size(), wildcard.size(), wildcard)) if (parsed["host"].size() >= wildcard.size() && 0 == wildcard.compare(parsed["host"].size() - wildcard.size(), wildcard.size(), wildcard))
{ {
return true; return true;
} }
} }
return std::find(Helpers::allowedDomains.begin(), Helpers::allowedDomains.end(), parsed["host"]) != Helpers::allowedDomains.end(); return std::find(Helpers::allowedDomains.begin(), Helpers::allowedDomains.end(), parsed["host"]) != Helpers::allowedDomains.end();
} }
} }
return false; return false;
} }

View File

@ -1,35 +1,35 @@
#include "pch.h" #include "pch.h"
#include "Hooks/ServerReplicator.h" #include "Hooks/ServerReplicator.h"
#ifdef SERVER #ifdef SERVER
static std::map<ServerReplicator*, RakPeerInterface*> rakPeers; static std::map<ServerReplicator*, RakPeerInterface*> rakPeers;
ServerReplicator__sendTop_t ServerReplicator__sendTop = (ServerReplicator__sendTop_t)ADDRESS_SERVERREPLICATOR__SENDTOP; ServerReplicator__sendTop_t ServerReplicator__sendTop = (ServerReplicator__sendTop_t)ADDRESS_SERVERREPLICATOR__SENDTOP;
ServerReplicator__processTicket_t ServerReplicator__processTicket = (ServerReplicator__processTicket_t)ADDRESS_SERVERREPLICATOR__PROCESSTICKET; ServerReplicator__processTicket_t ServerReplicator__processTicket = (ServerReplicator__processTicket_t)ADDRESS_SERVERREPLICATOR__PROCESSTICKET;
void __fastcall ServerReplicator__sendTop_hook(ServerReplicator* _this, void*, RakPeerInterface* peer) void __fastcall ServerReplicator__sendTop_hook(ServerReplicator* _this, void*, RakPeerInterface* peer)
{ {
if (_this->isAuthenticated) if (_this->isAuthenticated)
{ {
ServerReplicator__sendTop(_this, peer); ServerReplicator__sendTop(_this, peer);
} }
else if (rakPeers.find(_this) == rakPeers.end()) else if (rakPeers.find(_this) == rakPeers.end())
{ {
rakPeers.insert(std::pair<ServerReplicator*, RakPeerInterface*>(_this, peer)); rakPeers.insert(std::pair<ServerReplicator*, RakPeerInterface*>(_this, peer));
} }
} }
void __fastcall ServerReplicator__processTicket_hook(ServerReplicator* _this, void*, Packet* packet) void __fastcall ServerReplicator__processTicket_hook(ServerReplicator* _this, void*, Packet* packet)
{ {
ServerReplicator__processTicket(_this, packet); ServerReplicator__processTicket(_this, packet);
auto pos = rakPeers.find(_this); auto pos = rakPeers.find(_this);
if (_this->isAuthenticated) if (_this->isAuthenticated)
{ {
ServerReplicator__sendTop_hook(_this, nullptr, pos->second); ServerReplicator__sendTop_hook(_this, nullptr, pos->second);
} }
} }
#endif #endif

View File

@ -1,26 +1,26 @@
#include "pch.h" #include "pch.h"
#include "Hooks/StandardOut.h" #include "Hooks/StandardOut.h"
#ifdef SERVER #ifdef SERVER
StandardOut__print_t StandardOut__print = (StandardOut__print_t)ADDRESS_STANDARDOUT__PRINT; StandardOut__print_t StandardOut__print = (StandardOut__print_t)ADDRESS_STANDARDOUT__PRINT;
void __fastcall StandardOut__print_hook(int _this, void*, int type, std::string* message) void __fastcall StandardOut__print_hook(int _this, void*, int type, std::string* message)
{ {
StandardOut__print(_this, type, message); StandardOut__print(_this, type, message);
#ifdef SERVER #ifdef SERVER
if (Server::Handle) if (Server::Handle)
{ {
#ifndef _DEBUG #ifndef _DEBUG
// Message pointer is offset 4 bytes when the DLL is compiled as release // Message pointer is offset 4 bytes when the DLL is compiled as release
message = reinterpret_cast<std::string*>((int)message + 4); message = reinterpret_cast<std::string*>((int)message + 4);
#endif #endif
Server::Log::Output((LogSeverity)type, message->c_str()); Server::Log::Output((LogSeverity)type, message->c_str());
} }
#endif #endif
} }
#endif #endif

View File

@ -1,56 +1,56 @@
#pragma once #pragma once
// This is commented out since our CI defines this automatically // This is commented out since our CI defines this automatically
// #define SERVER // #define SERVER
// #define PLAYER // #define PLAYER
#define BASE_URL "https://tadah.rocks" #define BASE_URL "https://kiseki.lol"
#define DISCORD_APP_ID 923705431543668736 #define DISCORD_APP_ID 923705431543668736
#define ALLOWED_WILDCARD_DOMAINS "tadah.rocks", "rbxcdn.com", "roblox.com" #define ALLOWED_WILDCARD_DOMAINS "kiseki.lol", "rbxcdn.com", "roblox.com"
#define ALLOWED_DOMAINS #define ALLOWED_DOMAINS
#define ALLOWED_SCHEMES "http", "https" #define ALLOWED_SCHEMES "http", "https"
#define ALLOWED_EMBEDDED_SCHEMES "javascript", "jscript", "res" #define ALLOWED_EMBEDDED_SCHEMES "javascript", "jscript", "res"
#ifdef _DEBUG #ifdef _DEBUG
#define PUBLIC_KEY "BgIAAACkAABSU0ExABAAAAEAAQAVZ+t4ywGMLfMmCbtQv8HNKsSGERgVq+giTsaTbovzYYsX4LRxqQWk81MDX3VlwdpHqcKlZJgsB9xQMt6jSy79f89UZybasguwuljUsFoUCkMinjnnJZuGKJouqq5+OL86q/PafC8xhDIU2GnP/ALcLsk9letXLUR/OFHnD32MkEzbMax89d263LO1T2sjGLQCVM438ATF2GNdqJIEWVLDGqv+4UkN+2otAfOToJ/y+e1L4fFi9xonV0vc8RhOQ8U6WzdKVK+0KpmAncFw/MUYAXtBO37CCVRX4cHQ+9XCFMO9XLBkC9F6GKe1RlhM/YsOqKVBvaiPpWlQFgQQk2VaPO37qjKiAHHAB9Dp3TJbF+5nUgsCHP1Z9f1nwdl1e/XrDSHjktF/r5dCOnwBGwZHsjxL526HdkH+z0OaBvpF+N72iJtIgimueMakpuAZLF5k++QRqsdJf6qgQPHSkXClA0arKM4OUsZt7lHnCnVxHdX/zWqGPhzZvo143OPLgpGvgVextlpJ3E3wFCItSSv85J6wyRd1bh68i9JOOHI08d/EQoa0/b2VqqKMv8XmULwRU7+h/INZbrFnNXT4k9UE3M4WmAfuKqm6/Aej8LAArZJycoCJSPfddUaFICIUlEw6qCayI/EcXxI+zu5ipJHL3FpsjTcnB873+DNWQHCD5g==" #define PUBLIC_KEY "BgIAAACkAABSU0ExABAAAAEAAQAVZ+t4ywGMLfMmCbtQv8HNKsSGERgVq+giTsaTbovzYYsX4LRxqQWk81MDX3VlwdpHqcKlZJgsB9xQMt6jSy79f89UZybasguwuljUsFoUCkMinjnnJZuGKJouqq5+OL86q/PafC8xhDIU2GnP/ALcLsk9letXLUR/OFHnD32MkEzbMax89d263LO1T2sjGLQCVM438ATF2GNdqJIEWVLDGqv+4UkN+2otAfOToJ/y+e1L4fFi9xonV0vc8RhOQ8U6WzdKVK+0KpmAncFw/MUYAXtBO37CCVRX4cHQ+9XCFMO9XLBkC9F6GKe1RlhM/YsOqKVBvaiPpWlQFgQQk2VaPO37qjKiAHHAB9Dp3TJbF+5nUgsCHP1Z9f1nwdl1e/XrDSHjktF/r5dCOnwBGwZHsjxL526HdkH+z0OaBvpF+N72iJtIgimueMakpuAZLF5k++QRqsdJf6qgQPHSkXClA0arKM4OUsZt7lHnCnVxHdX/zWqGPhzZvo143OPLgpGvgVextlpJ3E3wFCItSSv85J6wyRd1bh68i9JOOHI08d/EQoa0/b2VqqKMv8XmULwRU7+h/INZbrFnNXT4k9UE3M4WmAfuKqm6/Aej8LAArZJycoCJSPfddUaFICIUlEw6qCayI/EcXxI+zu5ipJHL3FpsjTcnB873+DNWQHCD5g=="
#else #else
#define PUBLIC_KEY 0x06, 0x02, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x52, 0x53, 0x41, 0x31, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x15, 0x67, 0xeb, 0x78, 0xcb, 0x01, 0x8c, 0x2d, 0xf3, 0x26, 0x09, 0xbb, 0x50, 0xbf, 0xc1, 0xcd, 0x2a, 0xc4, 0x86, 0x11, 0x18, 0x15, 0xab, 0xe8, 0x22, 0x4e, 0xc6, 0x93, 0x6e, 0x8b, 0xf3, 0x61, 0x8b, 0x17, 0xe0, 0xb4, 0x71, 0xa9, 0x05, 0xa4, 0xf3, 0x53, 0x03, 0x5f, 0x75, 0x65, 0xc1, 0xda, 0x47, 0xa9, 0xc2, 0xa5, 0x64, 0x98, 0x2c, 0x07, 0xdc, 0x50, 0x32, 0xde, 0xa3, 0x4b, 0x2e, 0xfd, 0x7f, 0xcf, 0x54, 0x67, 0x26, 0xda, 0xb2, 0x0b, 0xb0, 0xba, 0x58, 0xd4, 0xb0, 0x5a, 0x14, 0x0a, 0x43, 0x22, 0x9e, 0x39, 0xe7, 0x25, 0x9b, 0x86, 0x28, 0x9a, 0x2e, 0xaa, 0xae, 0x7e, 0x38, 0xbf, 0x3a, 0xab, 0xf3, 0xda, 0x7c, 0x2f, 0x31, 0x84, 0x32, 0x14, 0xd8, 0x69, 0xcf, 0xfc, 0x02, 0xdc, 0x2e, 0xc9, 0x3d, 0x95, 0xeb, 0x57, 0x2d, 0x44, 0x7f, 0x38, 0x51, 0xe7, 0x0f, 0x7d, 0x8c, 0x90, 0x4c, 0xdb, 0x31, 0xac, 0x7c, 0xf5, 0xdd, 0xba, 0xdc, 0xb3, 0xb5, 0x4f, 0x6b, 0x23, 0x18, 0xb4, 0x02, 0x54, 0xce, 0x37, 0xf0, 0x04, 0xc5, 0xd8, 0x63, 0x5d, 0xa8, 0x92, 0x04, 0x59, 0x52, 0xc3, 0x1a, 0xab, 0xfe, 0xe1, 0x49, 0x0d, 0xfb, 0x6a, 0x2d, 0x01, 0xf3, 0x93, 0xa0, 0x9f, 0xf2, 0xf9, 0xed, 0x4b, 0xe1, 0xf1, 0x62, 0xf7, 0x1a, 0x27, 0x57, 0x4b, 0xdc, 0xf1, 0x18, 0x4e, 0x43, 0xc5, 0x3a, 0x5b, 0x37, 0x4a, 0x54, 0xaf, 0xb4, 0x2a, 0x99, 0x80, 0x9d, 0xc1, 0x70, 0xfc, 0xc5, 0x18, 0x01, 0x7b, 0x41, 0x3b, 0x7e, 0xc2, 0x09, 0x54, 0x57, 0xe1, 0xc1, 0xd0, 0xfb, 0xd5, 0xc2, 0x14, 0xc3, 0xbd, 0x5c, 0xb0, 0x64, 0x0b, 0xd1, 0x7a, 0x18, 0xa7, 0xb5, 0x46, 0x58, 0x4c, 0xfd, 0x8b, 0x0e, 0xa8, 0xa5, 0x41, 0xbd, 0xa8, 0x8f, 0xa5, 0x69, 0x50, 0x16, 0x04, 0x10, 0x93, 0x65, 0x5a, 0x3c, 0xed, 0xfb, 0xaa, 0x32, 0xa2, 0x00, 0x71, 0xc0, 0x07, 0xd0, 0xe9, 0xdd, 0x32, 0x5b, 0x17, 0xee, 0x67, 0x52, 0x0b, 0x02, 0x1c, 0xfd, 0x59, 0xf5, 0xfd, 0x67, 0xc1, 0xd9, 0x75, 0x7b, 0xf5, 0xeb, 0x0d, 0x21, 0xe3, 0x92, 0xd1, 0x7f, 0xaf, 0x97, 0x42, 0x3a, 0x7c, 0x01, 0x1b, 0x06, 0x47, 0xb2, 0x3c, 0x4b, 0xe7, 0x6e, 0x87, 0x76, 0x41, 0xfe, 0xcf, 0x43, 0x9a, 0x06, 0xfa, 0x45, 0xf8, 0xde, 0xf6, 0x88, 0x9b, 0x48, 0x82, 0x29, 0xae, 0x78, 0xc6, 0xa4, 0xa6, 0xe0, 0x19, 0x2c, 0x5e, 0x64, 0xfb, 0xe4, 0x11, 0xaa, 0xc7, 0x49, 0x7f, 0xaa, 0xa0, 0x40, 0xf1, 0xd2, 0x91, 0x70, 0xa5, 0x03, 0x46, 0xab, 0x28, 0xce, 0x0e, 0x52, 0xc6, 0x6d, 0xee, 0x51, 0xe7, 0x0a, 0x75, 0x71, 0x1d, 0xd5, 0xff, 0xcd, 0x6a, 0x86, 0x3e, 0x1c, 0xd9, 0xbe, 0x8d, 0x78, 0xdc, 0xe3, 0xcb, 0x82, 0x91, 0xaf, 0x81, 0x57, 0xb1, 0xb6, 0x5a, 0x49, 0xdc, 0x4d, 0xf0, 0x14, 0x22, 0x2d, 0x49, 0x2b, 0xfc, 0xe4, 0x9e, 0xb0, 0xc9, 0x17, 0x75, 0x6e, 0x1e, 0xbc, 0x8b, 0xd2, 0x4e, 0x38, 0x72, 0x34, 0xf1, 0xdf, 0xc4, 0x42, 0x86, 0xb4, 0xfd, 0xbd, 0x95, 0xaa, 0xa2, 0x8c, 0xbf, 0xc5, 0xe6, 0x50, 0xbc, 0x11, 0x53, 0xbf, 0xa1, 0xfc, 0x83, 0x59, 0x6e, 0xb1, 0x67, 0x35, 0x74, 0xf8, 0x93, 0xd5, 0x04, 0xdc, 0xce, 0x16, 0x98, 0x07, 0xee, 0x2a, 0xa9, 0xba, 0xfc, 0x07, 0xa3, 0xf0, 0xb0, 0x00, 0xad, 0x92, 0x72, 0x72, 0x80, 0x89, 0x48, 0xf7, 0xdd, 0x75, 0x46, 0x85, 0x20, 0x22, 0x14, 0x94, 0x4c, 0x3a, 0xa8, 0x26, 0xb2, 0x23, 0xf1, 0x1c, 0x5f, 0x12, 0x3e, 0xce, 0xee, 0x62, 0xa4, 0x91, 0xcb, 0xdc, 0x5a, 0x6c, 0x8d, 0x37, 0x27, 0x07, 0xce, 0xf7, 0xf8, 0x33, 0x56, 0x40, 0x70, 0x83, 0xe6 #define PUBLIC_KEY 0x06, 0x02, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x52, 0x53, 0x41, 0x31, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x15, 0x67, 0xeb, 0x78, 0xcb, 0x01, 0x8c, 0x2d, 0xf3, 0x26, 0x09, 0xbb, 0x50, 0xbf, 0xc1, 0xcd, 0x2a, 0xc4, 0x86, 0x11, 0x18, 0x15, 0xab, 0xe8, 0x22, 0x4e, 0xc6, 0x93, 0x6e, 0x8b, 0xf3, 0x61, 0x8b, 0x17, 0xe0, 0xb4, 0x71, 0xa9, 0x05, 0xa4, 0xf3, 0x53, 0x03, 0x5f, 0x75, 0x65, 0xc1, 0xda, 0x47, 0xa9, 0xc2, 0xa5, 0x64, 0x98, 0x2c, 0x07, 0xdc, 0x50, 0x32, 0xde, 0xa3, 0x4b, 0x2e, 0xfd, 0x7f, 0xcf, 0x54, 0x67, 0x26, 0xda, 0xb2, 0x0b, 0xb0, 0xba, 0x58, 0xd4, 0xb0, 0x5a, 0x14, 0x0a, 0x43, 0x22, 0x9e, 0x39, 0xe7, 0x25, 0x9b, 0x86, 0x28, 0x9a, 0x2e, 0xaa, 0xae, 0x7e, 0x38, 0xbf, 0x3a, 0xab, 0xf3, 0xda, 0x7c, 0x2f, 0x31, 0x84, 0x32, 0x14, 0xd8, 0x69, 0xcf, 0xfc, 0x02, 0xdc, 0x2e, 0xc9, 0x3d, 0x95, 0xeb, 0x57, 0x2d, 0x44, 0x7f, 0x38, 0x51, 0xe7, 0x0f, 0x7d, 0x8c, 0x90, 0x4c, 0xdb, 0x31, 0xac, 0x7c, 0xf5, 0xdd, 0xba, 0xdc, 0xb3, 0xb5, 0x4f, 0x6b, 0x23, 0x18, 0xb4, 0x02, 0x54, 0xce, 0x37, 0xf0, 0x04, 0xc5, 0xd8, 0x63, 0x5d, 0xa8, 0x92, 0x04, 0x59, 0x52, 0xc3, 0x1a, 0xab, 0xfe, 0xe1, 0x49, 0x0d, 0xfb, 0x6a, 0x2d, 0x01, 0xf3, 0x93, 0xa0, 0x9f, 0xf2, 0xf9, 0xed, 0x4b, 0xe1, 0xf1, 0x62, 0xf7, 0x1a, 0x27, 0x57, 0x4b, 0xdc, 0xf1, 0x18, 0x4e, 0x43, 0xc5, 0x3a, 0x5b, 0x37, 0x4a, 0x54, 0xaf, 0xb4, 0x2a, 0x99, 0x80, 0x9d, 0xc1, 0x70, 0xfc, 0xc5, 0x18, 0x01, 0x7b, 0x41, 0x3b, 0x7e, 0xc2, 0x09, 0x54, 0x57, 0xe1, 0xc1, 0xd0, 0xfb, 0xd5, 0xc2, 0x14, 0xc3, 0xbd, 0x5c, 0xb0, 0x64, 0x0b, 0xd1, 0x7a, 0x18, 0xa7, 0xb5, 0x46, 0x58, 0x4c, 0xfd, 0x8b, 0x0e, 0xa8, 0xa5, 0x41, 0xbd, 0xa8, 0x8f, 0xa5, 0x69, 0x50, 0x16, 0x04, 0x10, 0x93, 0x65, 0x5a, 0x3c, 0xed, 0xfb, 0xaa, 0x32, 0xa2, 0x00, 0x71, 0xc0, 0x07, 0xd0, 0xe9, 0xdd, 0x32, 0x5b, 0x17, 0xee, 0x67, 0x52, 0x0b, 0x02, 0x1c, 0xfd, 0x59, 0xf5, 0xfd, 0x67, 0xc1, 0xd9, 0x75, 0x7b, 0xf5, 0xeb, 0x0d, 0x21, 0xe3, 0x92, 0xd1, 0x7f, 0xaf, 0x97, 0x42, 0x3a, 0x7c, 0x01, 0x1b, 0x06, 0x47, 0xb2, 0x3c, 0x4b, 0xe7, 0x6e, 0x87, 0x76, 0x41, 0xfe, 0xcf, 0x43, 0x9a, 0x06, 0xfa, 0x45, 0xf8, 0xde, 0xf6, 0x88, 0x9b, 0x48, 0x82, 0x29, 0xae, 0x78, 0xc6, 0xa4, 0xa6, 0xe0, 0x19, 0x2c, 0x5e, 0x64, 0xfb, 0xe4, 0x11, 0xaa, 0xc7, 0x49, 0x7f, 0xaa, 0xa0, 0x40, 0xf1, 0xd2, 0x91, 0x70, 0xa5, 0x03, 0x46, 0xab, 0x28, 0xce, 0x0e, 0x52, 0xc6, 0x6d, 0xee, 0x51, 0xe7, 0x0a, 0x75, 0x71, 0x1d, 0xd5, 0xff, 0xcd, 0x6a, 0x86, 0x3e, 0x1c, 0xd9, 0xbe, 0x8d, 0x78, 0xdc, 0xe3, 0xcb, 0x82, 0x91, 0xaf, 0x81, 0x57, 0xb1, 0xb6, 0x5a, 0x49, 0xdc, 0x4d, 0xf0, 0x14, 0x22, 0x2d, 0x49, 0x2b, 0xfc, 0xe4, 0x9e, 0xb0, 0xc9, 0x17, 0x75, 0x6e, 0x1e, 0xbc, 0x8b, 0xd2, 0x4e, 0x38, 0x72, 0x34, 0xf1, 0xdf, 0xc4, 0x42, 0x86, 0xb4, 0xfd, 0xbd, 0x95, 0xaa, 0xa2, 0x8c, 0xbf, 0xc5, 0xe6, 0x50, 0xbc, 0x11, 0x53, 0xbf, 0xa1, 0xfc, 0x83, 0x59, 0x6e, 0xb1, 0x67, 0x35, 0x74, 0xf8, 0x93, 0xd5, 0x04, 0xdc, 0xce, 0x16, 0x98, 0x07, 0xee, 0x2a, 0xa9, 0xba, 0xfc, 0x07, 0xa3, 0xf0, 0xb0, 0x00, 0xad, 0x92, 0x72, 0x72, 0x80, 0x89, 0x48, 0xf7, 0xdd, 0x75, 0x46, 0x85, 0x20, 0x22, 0x14, 0x94, 0x4c, 0x3a, 0xa8, 0x26, 0xb2, 0x23, 0xf1, 0x1c, 0x5f, 0x12, 0x3e, 0xce, 0xee, 0x62, 0xa4, 0x91, 0xcb, 0xdc, 0x5a, 0x6c, 0x8d, 0x37, 0x27, 0x07, 0xce, 0xf7, 0xf8, 0x33, 0x56, 0x40, 0x70, 0x83, 0xe6
#endif #endif
#define CLASSPADDING_DATAMODEL__JOBID 739 #define CLASSPADDING_DATAMODEL__JOBID 739
#define ADDRESS_HTTP__HTTPGETPOSTWININET 0x0 #define ADDRESS_HTTP__HTTPGETPOSTWININET 0x0
#define ADDRESS_HTTP__TRUSTCHECK 0x005B7050 #define ADDRESS_HTTP__TRUSTCHECK 0x005B7050
#define ADDRESS_CRYPT__VERIFYSIGNATUREBASE64 0x00809EC0 #define ADDRESS_CRYPT__VERIFYSIGNATUREBASE64 0x00809EC0
#define ADDRESS_CONTEXT__REQUIREPERMISSION 0x0 #define ADDRESS_CONTEXT__REQUIREPERMISSION 0x0
#define ADDRESS_CONTEXT__ISINROLE 0x0 #define ADDRESS_CONTEXT__ISINROLE 0x0
#define ADDRESS_DATAMODEL__GETJOBID 0x005E70C0 #define ADDRESS_DATAMODEL__GETJOBID 0x005E70C0
#define ADDRESS_STANDARDOUT__PRINT 0x005B25E0 #define ADDRESS_STANDARDOUT__PRINT 0x005B25E0
#define ADDRESS_SERVERREPLICATOR__SENDTOP 0x00513E80 #define ADDRESS_SERVERREPLICATOR__SENDTOP 0x00513E80
#define ADDRESS_SERVERREPLICATOR__PROCESSTICKET 0x00514B60 #define ADDRESS_SERVERREPLICATOR__PROCESSTICKET 0x00514B60
#define ADDRESS_SERVERREPLICATOR__PROCESSPACKET 0x00514B60 #define ADDRESS_SERVERREPLICATOR__PROCESSPACKET 0x00514B60
#define CLASSLOCATION_CROBLOXAPP 0x00CBA8A0 #define CLASSLOCATION_CROBLOXAPP 0x00CBA8A0
#define CLASSLOCATION_CAPP 0x00406D80 #define CLASSLOCATION_CAPP 0x00406D80
#define CLASSPADDING_CROBLOXDOC__WORKSPACE 45 #define CLASSPADDING_CROBLOXDOC__WORKSPACE 45
#define ADDRESS_CAPP__CREATEGAME 0x00406D80 #define ADDRESS_CAPP__CREATEGAME 0x00406D80
#define ADDRESS_CAPP__ROBLOXAUTHENTICATE 0x00409050 #define ADDRESS_CAPP__ROBLOXAUTHENTICATE 0x00409050
#define ADDRESS_CROBLOXAPP__INITINSTANCE 0x004613C0 #define ADDRESS_CROBLOXAPP__INITINSTANCE 0x004613C0
#define ADDRESS_CROBLOXAPP__CREATEDOCUMENT 0x0045D030 #define ADDRESS_CROBLOXAPP__CREATEDOCUMENT 0x0045D030
#define ADDRESS_CWORKSPACE__EXECURLSCRIPT 0x0049FC90 #define ADDRESS_CWORKSPACE__EXECURLSCRIPT 0x0049FC90
#define ADDRESS_CROBLOXCOMMANDLINEINFO__PARSEPARAM 0x0045EE50 #define ADDRESS_CROBLOXCOMMANDLINEINFO__PARSEPARAM 0x0045EE50
#define ADDRESS_CCOMMANDLINEINFO__PARSELAST 0x0081354A #define ADDRESS_CCOMMANDLINEINFO__PARSELAST 0x0081354A
#ifndef _DEBUG #ifndef _DEBUG
#define PADDING_STRUCT 1 #define PADDING_STRUCT 1
#else #else
#define PADDING_STRUCT 0 #define PADDING_STRUCT 0
#endif #endif
#define RBX__MESSAGE_INFO 0 #define RBX__MESSAGE_INFO 0
#define RBX__MESSAGE_OUTPUT 1 #define RBX__MESSAGE_OUTPUT 1
#define RBX__MESSAGE_WARNING 2 #define RBX__MESSAGE_WARNING 2
#define RBX__MESSAGE_ERROR 3 #define RBX__MESSAGE_ERROR 3

View File

@ -1,20 +1,20 @@
#pragma once #pragma once
#include <discord_rpc.h> #include <discord_rpc.h>
#include <discord_register.h> #include <discord_register.h>
#include <rapidjson/document.h> #include <rapidjson/document.h>
#include "Configuration.h" #include "Configuration.h"
#include "Hooks/CRoblox.h" #include "Hooks/CRoblox.h"
#ifdef PLAYER #ifdef PLAYER
class Discord { class Discord {
public: public:
static void Initialize(const std::string joinScriptUrl); static void Initialize(const std::string joinScriptUrl);
static void Cleanup(); static void Cleanup();
private: private:
static void Update(); static void Update();
}; };
#endif #endif

View File

@ -1,26 +1,26 @@
#pragma once #pragma once
#include <curl/curl.h> #include <curl/curl.h>
#include "Configuration.h" #include "Configuration.h"
class Helpers class Helpers
{ {
public: public:
static const std::vector<BYTE> publicKey; static const std::vector<BYTE> publicKey;
static const std::vector<std::string> allowedWildcardDomains; static const std::vector<std::string> allowedWildcardDomains;
static const std::vector<std::string> allowedDomains; static const std::vector<std::string> allowedDomains;
static const std::vector<std::string> allowedSchemes; static const std::vector<std::string> allowedSchemes;
static const std::vector<std::string> allowedEmbeddedSchemes; static const std::vector<std::string> allowedEmbeddedSchemes;
static bool isASCII(const std::string& s); static bool isASCII(const std::string& s);
static std::string toLower(std::string s); static std::string toLower(std::string s);
static std::vector<BYTE> base64Decode(const std::string_view data); static std::vector<BYTE> base64Decode(const std::string_view data);
static std::map<std::string, std::string> parseQueryString(const std::string query); static std::map<std::string, std::string> parseQueryString(const std::string query);
static std::string joinQueryString(const std::map<std::string, std::string> query); static std::string joinQueryString(const std::map<std::string, std::string> query);
static std::string ws2s(const std::wstring widestring); static std::string ws2s(const std::wstring widestring);
static size_t write(char* contents, size_t size, size_t memory, void* pointer); static size_t write(char* contents, size_t size, size_t memory, void* pointer);
static std::string getModulePath(); static std::string getModulePath();
static std::string getISOTimestamp(); static std::string getISOTimestamp();
static std::pair<bool, std::map<std::string, std::string>> parseURL(const std::string url); static std::pair<bool, std::map<std::string, std::string>> parseURL(const std::string url);
static std::pair<bool, std::string> httpGet(const std::string url); static std::pair<bool, std::string> httpGet(const std::string url);
}; };

View File

@ -1,47 +1,47 @@
#pragma once #pragma once
#include <curl/curl.h> #include <curl/curl.h>
#include "Configuration.h" #include "Configuration.h"
#include "Helpers.h" #include "Helpers.h"
#include "Discord.h" #include "Discord.h"
class CWorkspace; class CWorkspace;
const auto CWorkspace__ExecUrlScript = (HRESULT(__stdcall*)(CWorkspace * workspace, LPCWSTR, VARIANTARG, VARIANTARG, VARIANTARG, VARIANTARG, LPVOID))ADDRESS_CWORKSPACE__EXECURLSCRIPT; const auto CWorkspace__ExecUrlScript = (HRESULT(__stdcall*)(CWorkspace * workspace, LPCWSTR, VARIANTARG, VARIANTARG, VARIANTARG, VARIANTARG, LPVOID))ADDRESS_CWORKSPACE__EXECURLSCRIPT;
struct CRobloxDoc struct CRobloxDoc
{ {
void* padding1[CLASSPADDING_CROBLOXDOC__WORKSPACE]; void* padding1[CLASSPADDING_CROBLOXDOC__WORKSPACE];
CWorkspace* workspace; CWorkspace* workspace;
}; };
struct CApp; struct CApp;
const auto CApp__RobloxAuthenticate = (void* (__thiscall*)(CApp * _this, LPVOID, LPCWSTR, LPCWSTR))ADDRESS_CAPP__ROBLOXAUTHENTICATE; const auto CApp__RobloxAuthenticate = (void* (__thiscall*)(CApp * _this, LPVOID, LPCWSTR, LPCWSTR))ADDRESS_CAPP__ROBLOXAUTHENTICATE;
struct CRobloxApp; struct CRobloxApp;
const auto CRobloxApp__CreateDocument = (CRobloxDoc * (__thiscall*)(CRobloxApp * _this))ADDRESS_CROBLOXAPP__CREATEDOCUMENT; const auto CRobloxApp__CreateDocument = (CRobloxDoc * (__thiscall*)(CRobloxApp * _this))ADDRESS_CROBLOXAPP__CREATEDOCUMENT;
struct CCommandLineInfo struct CCommandLineInfo
{ {
void* padding1[3]; void* padding1[3];
BOOL m_bRunAutomated; BOOL m_bRunAutomated;
}; };
class CRobloxCommandLineInfo : public CCommandLineInfo {}; class CRobloxCommandLineInfo : public CCommandLineInfo {};
const auto CCommandLineInfo__ParseLast = (void(__thiscall*)(CCommandLineInfo * _this, BOOL bLast))ADDRESS_CCOMMANDLINEINFO__PARSELAST; const auto CCommandLineInfo__ParseLast = (void(__thiscall*)(CCommandLineInfo * _this, BOOL bLast))ADDRESS_CCOMMANDLINEINFO__PARSELAST;
typedef BOOL(__thiscall* CRobloxApp__InitInstance_t)(CRobloxApp* _this); typedef BOOL(__thiscall* CRobloxApp__InitInstance_t)(CRobloxApp* _this);
typedef void(__thiscall* CRobloxCommandLineInfo__ParseParam_t)(CRobloxCommandLineInfo* _this, const char* pszParam, BOOL bFlag, BOOL bLast); typedef void(__thiscall* CRobloxCommandLineInfo__ParseParam_t)(CRobloxCommandLineInfo* _this, const char* pszParam, BOOL bFlag, BOOL bLast);
BOOL __fastcall CRobloxApp__InitInstance_hook(CRobloxApp* _this); BOOL __fastcall CRobloxApp__InitInstance_hook(CRobloxApp* _this);
void __fastcall CRobloxCommandLineInfo__ParseParam_hook(CRobloxCommandLineInfo* _this, void*, const char* pszParam, BOOL bFlag, BOOL bLast); void __fastcall CRobloxCommandLineInfo__ParseParam_hook(CRobloxCommandLineInfo* _this, void*, const char* pszParam, BOOL bFlag, BOOL bLast);
extern CRobloxApp__InitInstance_t CRobloxApp__InitInstance; extern CRobloxApp__InitInstance_t CRobloxApp__InitInstance;
extern CRobloxCommandLineInfo__ParseParam_t CRobloxCommandLineInfo__ParseParam; extern CRobloxCommandLineInfo__ParseParam_t CRobloxCommandLineInfo__ParseParam;
extern std::wstring jobId; extern std::wstring jobId;
extern bool hasJobId; extern bool hasJobId;

View File

@ -1,13 +1,13 @@
#pragma once #pragma once
#include "Configuration.h" #include "Configuration.h"
#ifdef _DEBUG #ifdef _DEBUG
const auto Context__isInRole = (bool(__cdecl*)(int identity, int permission))ADDRESS_CONTEXT__ISINROLE; const auto Context__isInRole = (bool(__cdecl*)(int identity, int permission))ADDRESS_CONTEXT__ISINROLE;
typedef void (__thiscall* Context__requirePermission_t)(void* _this, int permission, const char* operation); typedef void (__thiscall* Context__requirePermission_t)(void* _this, int permission, const char* operation);
void __fastcall Context__requirePermission_hook(void* _this, void*, int permission, const char* operation); void __fastcall Context__requirePermission_hook(void* _this, void*, int permission, const char* operation);
extern Context__requirePermission_t Context__requirePermission; extern Context__requirePermission_t Context__requirePermission;
#endif #endif

View File

@ -1,20 +1,20 @@
#pragma once #pragma once
#include <wincrypt.h> #include <wincrypt.h>
#include "Configuration.h" #include "Configuration.h"
typedef void(__thiscall* Crypt__verifySignatureBase64_t)(HCRYPTPROV* _this, int a2, BYTE* pbData, int a4, int a5, int a6, DWORD dwDataLen, int a8, int a9, int a10, int a11, int a12, int a13, int a14, int a15); typedef void(__thiscall* Crypt__verifySignatureBase64_t)(HCRYPTPROV* _this, int a2, BYTE* pbData, int a4, int a5, int a6, DWORD dwDataLen, int a8, int a9, int a10, int a11, int a12, int a13, int a14, int a15);
void __fastcall Crypt__verifySignatureBase64_hook(HCRYPTPROV* _this, void*, int a2, BYTE* pbData, int a4, int a5, int a6, DWORD dwDataLen, int a8, int a9, int a10, int a11, int a12, int a13, int a14, int a15); void __fastcall Crypt__verifySignatureBase64_hook(HCRYPTPROV* _this, void*, int a2, BYTE* pbData, int a4, int a5, int a6, DWORD dwDataLen, int a8, int a9, int a10, int a11, int a12, int a13, int a14, int a15);
extern Crypt__verifySignatureBase64_t Crypt__verifySignatureBase64; extern Crypt__verifySignatureBase64_t Crypt__verifySignatureBase64;
class Crypt class Crypt
{ {
HCRYPTPROV context; HCRYPTPROV context;
HCRYPTKEY key; HCRYPTKEY key;
public: public:
Crypt(); Crypt();
~Crypt(); ~Crypt();
bool verifySignatureBase64(std::string message, std::string signatureBase64, ALG_ID algorithm); bool verifySignatureBase64(std::string message, std::string signatureBase64, ALG_ID algorithm);
}; };

View File

@ -1,20 +1,20 @@
#pragma once #pragma once
#include "Helpers.h" #include "Helpers.h"
#include "Configuration.h" #include "Configuration.h"
#include "Hooks/CRoblox.h" #include "Hooks/CRoblox.h"
#ifdef SERVER #ifdef SERVER
struct DataModel struct DataModel
{ {
void* padding1[CLASSPADDING_DATAMODEL__JOBID]; void* padding1[CLASSPADDING_DATAMODEL__JOBID];
std::string jobId; std::string jobId;
}; };
typedef INT(__thiscall* DataModel__getJobId_t)(DataModel* _this, int a2); typedef INT(__thiscall* DataModel__getJobId_t)(DataModel* _this, int a2);
int __fastcall DataModel__getJobId_hook(DataModel* _this, void*, int a2); int __fastcall DataModel__getJobId_hook(DataModel* _this, void*, int a2);
extern DataModel__getJobId_t DataModel__getJobId; extern DataModel__getJobId_t DataModel__getJobId;
#endif #endif

View File

@ -1,30 +1,30 @@
#pragma once #pragma once
#include <curl/curl.h> #include <curl/curl.h>
#include <rapidjson/document.h> #include <rapidjson/document.h>
#include "Configuration.h" #include "Configuration.h"
#include "Helpers.h" #include "Helpers.h"
#ifdef SERVER #ifdef SERVER
#include "Hooks/StandardOut.h" #include "Hooks/StandardOut.h"
#endif #endif
struct Http struct Http
{ {
#if PADDING_STRUCT != 0 #if PADDING_STRUCT != 0
void* padding1[1]; void* padding1[1];
#endif #endif
std::string alternateUrl; std::string alternateUrl;
void* padding2[3 + PADDING_STRUCT]; void* padding2[3 + PADDING_STRUCT];
std::string url; std::string url;
}; };
typedef void (__thiscall* Http__httpGetPostWinInet_t)(Http* _this, bool isPost, int a3, bool compressData, LPCSTR additionalHeaders, int a6); typedef void (__thiscall* Http__httpGetPostWinInet_t)(Http* _this, bool isPost, int a3, bool compressData, LPCSTR additionalHeaders, int a6);
typedef bool(__thiscall* Http__trustCheck_t)(const char* url); typedef bool(__thiscall* Http__trustCheck_t)(const char* url);
void __fastcall Http__httpGetPostWinInet_hook(Http* _this, void*, bool isPost, int a3, bool compressData, LPCSTR additionalHeaders, int a6); void __fastcall Http__httpGetPostWinInet_hook(Http* _this, void*, bool isPost, int a3, bool compressData, LPCSTR additionalHeaders, int a6);
bool __fastcall Http__trustCheck_hook(const char* url); bool __fastcall Http__trustCheck_hook(const char* url);
extern Http__httpGetPostWinInet_t Http__httpGetPostWinInet; extern Http__httpGetPostWinInet_t Http__httpGetPostWinInet;
extern Http__trustCheck_t Http__trustCheck; extern Http__trustCheck_t Http__trustCheck;

View File

@ -1,33 +1,33 @@
#pragma once #pragma once
#include "Configuration.h" #include "Configuration.h"
#if defined(SERVER) #if defined(SERVER)
struct Packet struct Packet
{ {
void* padding1[7]; void* padding1[7];
unsigned int length; unsigned int length;
void* padding2[1]; void* padding2[1];
unsigned char* data; unsigned char* data;
}; };
struct RakPeerInterface {}; struct RakPeerInterface {};
struct ServerReplicator struct ServerReplicator
{ {
void* padding1[1869]; // offset of 0 -> 7476 void* padding1[1869]; // offset of 0 -> 7476
bool padding2; // offset of 7476 -> 7477 bool padding2; // offset of 7476 -> 7477
bool isAuthenticated; // offset of 7477 -> 7478 bool isAuthenticated; // offset of 7477 -> 7478
}; };
typedef void(__thiscall* ServerReplicator__sendTop_t)(ServerReplicator* _this, RakPeerInterface* peer); typedef void(__thiscall* ServerReplicator__sendTop_t)(ServerReplicator* _this, RakPeerInterface* peer);
typedef void(__thiscall* ServerReplicator__processTicket_t)(ServerReplicator* _this, Packet* packet); typedef void(__thiscall* ServerReplicator__processTicket_t)(ServerReplicator* _this, Packet* packet);
void __fastcall ServerReplicator__sendTop_hook(ServerReplicator* _this, void*, RakPeerInterface* peer); void __fastcall ServerReplicator__sendTop_hook(ServerReplicator* _this, void*, RakPeerInterface* peer);
void __fastcall ServerReplicator__processTicket_hook(ServerReplicator* _this, void*, Packet* packet); void __fastcall ServerReplicator__processTicket_hook(ServerReplicator* _this, void*, Packet* packet);
extern ServerReplicator__sendTop_t ServerReplicator__sendTop; extern ServerReplicator__sendTop_t ServerReplicator__sendTop;
extern ServerReplicator__processTicket_t ServerReplicator__processTicket; extern ServerReplicator__processTicket_t ServerReplicator__processTicket;
#endif #endif

View File

@ -1,14 +1,14 @@
#pragma once #pragma once
#include "Configuration.h" #include "Configuration.h"
#include "Patches.h" #include "Patches.h"
#include "Helpers.h" #include "Helpers.h"
#include "Server.h" #include "Server.h"
#ifdef SERVER #ifdef SERVER
typedef void(__thiscall* StandardOut__print_t)(int _this, int type, std::string* message); typedef void(__thiscall* StandardOut__print_t)(int _this, int type, std::string* message);
void __fastcall StandardOut__print_hook(int _this, void*, int type, std::string* message); void __fastcall StandardOut__print_hook(int _this, void*, int type, std::string* message);
extern StandardOut__print_t StandardOut__print; extern StandardOut__print_t StandardOut__print;
#endif #endif

View File

@ -1,16 +1,16 @@
#pragma once #pragma once
#include <detours/detours.h> #include <detours/detours.h>
namespace Patches namespace Patches
{ {
typedef std::pair<void**, void*> Patch; typedef std::pair<void**, void*> Patch;
extern std::vector<Patch> patchList; extern std::vector<Patch> patchList;
LONG Apply(); LONG Apply();
} }
#define START_PATCH_LIST() std::vector<Patches::Patch> Patches::patchList = { #define START_PATCH_LIST() std::vector<Patches::Patch> Patches::patchList = {
#define ADD_PATCH(a, b) { (void**)&(a), (b) }, #define ADD_PATCH(a, b) { (void**)&(a), (b) },
#define END_PATCH_LIST() }; #define END_PATCH_LIST() };

View File

@ -1,42 +1,42 @@
#pragma once #pragma once
#include "Configuration.h" #include "Configuration.h"
#include "Helpers.h" #include "Helpers.h"
#include "Hooks/StandardOut.h" #include "Hooks/StandardOut.h"
#ifdef SERVER #ifdef SERVER
enum class RequestType { enum class RequestType {
POST, POST,
GET GET
}; };
enum class LogSeverity { enum class LogSeverity {
Information = RBX__MESSAGE_INFO, Information = RBX__MESSAGE_INFO,
Output = RBX__MESSAGE_OUTPUT, Output = RBX__MESSAGE_OUTPUT,
Warning = RBX__MESSAGE_WARNING, Warning = RBX__MESSAGE_WARNING,
Error = RBX__MESSAGE_ERROR Error = RBX__MESSAGE_ERROR
}; };
class Server { class Server {
public: public:
static HANDLE Handle; static HANDLE Handle;
static void Initialize(const std::wstring jobId); static void Initialize(const std::wstring jobId);
static void Cleanup(); static void Cleanup();
struct Log struct Log
{ {
static void Http(const RequestType type, const std::string message); static void Http(const RequestType type, const std::string message);
static void Output(const LogSeverity severity, const std::string message); static void Output(const LogSeverity severity, const std::string message);
}; };
private: private:
static std::string HttpLogPath; static std::string HttpLogPath;
static std::string OutputLogPath; static std::string OutputLogPath;
static std::ofstream HttpLog; static std::ofstream HttpLog;
static std::ofstream OutputLog; static std::ofstream OutputLog;
}; };
#endif #endif

View File

@ -1,5 +1,5 @@
#pragma once #pragma once
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files // Windows Header Files
#include <windows.h> #include <windows.h>

View File

@ -1,18 +1,18 @@
#pragma once #pragma once
#include <windows.h> #include <windows.h>
#include <iomanip> #include <iomanip>
#include <iostream> #include <iostream>
#include <filesystem> #include <filesystem>
#include <fstream> #include <fstream>
#include <sstream> #include <sstream>
#include <string> #include <string>
#include <vector> #include <vector>
#include <map> #include <map>
#include <algorithm> #include <algorithm>
#include <stdexcept> #include <stdexcept>
#include <thread> #include <thread>
#include <ctime> #include <ctime>
#include <ios> #include <ios>
namespace fs = std::filesystem; namespace fs = std::filesystem;

View File

@ -1,14 +1,14 @@
//{{NO_DEPENDENCIES}} //{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file. // Microsoft Visual C++ generated include file.
// Used by PolygonDLL.rc // Used by PolygonDLL.rc
// Next default values for new objects // Next default values for new objects
// //
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS #ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101 #define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001 #define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101 #define _APS_NEXT_SYMED_VALUE 101
#endif #endif
#endif #endif

View File

@ -1,100 +1,100 @@
// Microsoft Visual C++ generated resource script. // Microsoft Visual C++ generated resource script.
// //
#include "Include/resource.h" #include "Include/resource.h"
#define APSTUDIO_READONLY_SYMBOLS #define APSTUDIO_READONLY_SYMBOLS
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// Generated from the TEXTINCLUDE 2 resource. // Generated from the TEXTINCLUDE 2 resource.
// //
#include "winres.h" #include "winres.h"
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS #undef APSTUDIO_READONLY_SYMBOLS
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// English (United States) resources // English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252) #pragma code_page(1252)
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// TEXTINCLUDE // TEXTINCLUDE
// //
1 TEXTINCLUDE 1 TEXTINCLUDE
BEGIN BEGIN
"resource.h\0" "resource.h\0"
END END
2 TEXTINCLUDE 2 TEXTINCLUDE
BEGIN BEGIN
"#include ""winres.h""\r\n" "#include ""winres.h""\r\n"
"\0" "\0"
END END
3 TEXTINCLUDE 3 TEXTINCLUDE
BEGIN BEGIN
"\r\n" "\r\n"
"\0" "\0"
END END
#endif // APSTUDIO_INVOKED #endif // APSTUDIO_INVOKED
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// Version // Version
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,0 FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0 PRODUCTVERSION 1,0,0,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
#else #else
FILEFLAGS 0x0L FILEFLAGS 0x0L
#endif #endif
FILEOS 0x40004L FILEOS 0x40004L
FILETYPE 0x2L FILETYPE 0x2L
FILESUBTYPE 0x0L FILESUBTYPE 0x0L
BEGIN BEGIN
BLOCK "StringFileInfo" BLOCK "StringFileInfo"
BEGIN BEGIN
BLOCK "040904b0" BLOCK "040904b0"
BEGIN BEGIN
VALUE "CompanyName", "Tadah" VALUE "CompanyName", "Kiseki"
VALUE "FileDescription", "Client Functionality Library" VALUE "FileDescription", "Client Functionality Library"
VALUE "FileVersion", "1.0.0.0" VALUE "FileVersion", "1.0.0.0"
VALUE "InternalName", "Tadah.dll" VALUE "InternalName", "Kiseki.Patcher.dll"
VALUE "LegalCopyright", "Copyright (C) Tadah and Project Polygon 2022" VALUE "LegalCopyright", "Copyright (C) Kiseki 2022-2023"
VALUE "OriginalFilename", "Tadah.dll" VALUE "OriginalFilename", "Kiseki.Patcher.dll"
VALUE "ProductName", "Client Functionality Library" VALUE "ProductName", "Client Functionality Library"
VALUE "ProductVersion", "1.0.0.0" VALUE "ProductVersion", "1.0.0.0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"
BEGIN BEGIN
VALUE "Translation", 0x409, 1200 VALUE "Translation", 0x409, 1200
END END
END END
#endif // English (United States) resources #endif // English (United States) resources
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED #ifndef APSTUDIO_INVOKED
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// Generated from the TEXTINCLUDE 3 resource. // Generated from the TEXTINCLUDE 3 resource.
// //
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED #endif // not APSTUDIO_INVOKED

View File

@ -1,165 +1,163 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion> <VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<ProjectGuid>{9d232642-fb2f-43dc-b0ac-c56e3b691233}</ProjectGuid> <ProjectGuid>{9d232642-fb2f-43dc-b0ac-c56e3b691233}</ProjectGuid>
<RootNamespace>Tadah.DLL</RootNamespace> <RootNamespace>Kiseki.Patcher</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
</ImportGroup> </ImportGroup>
<ImportGroup Label="Shared"> <ImportGroup Label="Shared">
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild> <EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild>
<TargetName>Tadah</TargetName> <OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir> <IntDir>obj\$(Configuration)\</IntDir>
<IntDir>obj\$(Configuration)\</IntDir> </PropertyGroup>
</PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <LinkIncremental>false</LinkIncremental>
<LinkIncremental>false</LinkIncremental> <EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild>
<EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild> <OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
<TargetName>Tadah</TargetName> <IntDir>obj\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir> </PropertyGroup>
<IntDir>obj\$(Configuration)\</IntDir> <PropertyGroup Label="Vcpkg">
</PropertyGroup> <VcpkgEnableManifest>true</VcpkgEnableManifest>
<PropertyGroup Label="Vcpkg"> </PropertyGroup>
<VcpkgEnableManifest>true</VcpkgEnableManifest> <PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PropertyGroup> <VcpkgInstalledDir>$(SolutionDir)packages</VcpkgInstalledDir>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgInstalledDir>$(SolutionDir)packages</VcpkgInstalledDir> </PropertyGroup>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet> <PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PropertyGroup> <VcpkgInstalledDir>$(SolutionDir)packages</VcpkgInstalledDir>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgInstalledDir>$(SolutionDir)packages</VcpkgInstalledDir> </PropertyGroup>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PropertyGroup> <ClCompile>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <WarningLevel>Level3</WarningLevel>
<ClCompile> <SDLCheck>true</SDLCheck>
<WarningLevel>Level3</WarningLevel> <PreprocessorDefinitions>WIN32;_DEBUG;KISEKIPATCHER_EXPORTS;_WINDOWS;_USRDLL;$(CIDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <ConformanceMode>true</ConformanceMode>
<PreprocessorDefinitions>WIN32;_DEBUG;TADAHDLL_EXPORTS;_WINDOWS;_USRDLL;$(TadahCIDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions> <PrecompiledHeader>Use</PrecompiledHeader>
<ConformanceMode>true</ConformanceMode> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeader>Use</PrecompiledHeader> <AdditionalIncludeDirectories>$(ProjectDir)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>$(ProjectDir)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ClCompile>
<LanguageStandard>stdcpp17</LanguageStandard> <Link>
</ClCompile> <SubSystem>Windows</SubSystem>
<Link> <GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem> <EnableUAC>false</EnableUAC>
<GenerateDebugInformation>true</GenerateDebugInformation> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<EnableUAC>false</EnableUAC> <AdditionalDependencies>detours.lib;crypt32.lib;libcurl-d.lib;WS2_32.lib;zlibd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <IgnoreAllDefaultLibraries>
<AdditionalDependencies>detours.lib;crypt32.lib;libcurl-d.lib;WS2_32.lib;zlibd.lib;%(AdditionalDependencies)</AdditionalDependencies> </IgnoreAllDefaultLibraries>
<IgnoreAllDefaultLibraries> <IgnoreSpecificDefaultLibraries>LIBCMTD</IgnoreSpecificDefaultLibraries>
</IgnoreAllDefaultLibraries> <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<IgnoreSpecificDefaultLibraries>LIBCMTD</IgnoreSpecificDefaultLibraries> </Link>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> </ItemDefinitionGroup>
</Link> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</ItemDefinitionGroup> <ClCompile>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <WarningLevel>Level3</WarningLevel>
<ClCompile> <FunctionLevelLinking>
<WarningLevel>Level3</WarningLevel> </FunctionLevelLinking>
<FunctionLevelLinking> <IntrinsicFunctions>false</IntrinsicFunctions>
</FunctionLevelLinking> <SDLCheck>true</SDLCheck>
<IntrinsicFunctions>false</IntrinsicFunctions> <PreprocessorDefinitions>WIN32;NDEBUG;KISEKIPATCHER_EXPORTS;_WINDOWS;_USRDLL;$(CIDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <ConformanceMode>true</ConformanceMode>
<PreprocessorDefinitions>WIN32;NDEBUG;TADAHDLL_EXPORTS;_WINDOWS;_USRDLL;$(TadahCIDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions> <PrecompiledHeader>Use</PrecompiledHeader>
<ConformanceMode>true</ConformanceMode> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeader>Use</PrecompiledHeader> <AdditionalIncludeDirectories>$(ProjectDir)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <WholeProgramOptimization>false</WholeProgramOptimization>
<Optimization>Disabled</Optimization> <LanguageStandard>stdcpp17</LanguageStandard>
<WholeProgramOptimization>false</WholeProgramOptimization> </ClCompile>
<LanguageStandard>stdcpp17</LanguageStandard> <Link>
</ClCompile> <SubSystem>Windows</SubSystem>
<Link> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <GenerateDebugInformation>true</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences> <EnableUAC>false</EnableUAC>
<GenerateDebugInformation>true</GenerateDebugInformation> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<EnableUAC>false</EnableUAC> <AdditionalDependencies>detours.lib;crypt32.lib;libcurl.lib;WS2_32.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <IgnoreAllDefaultLibraries>
<AdditionalDependencies>detours.lib;crypt32.lib;libcurl.lib;WS2_32.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies> </IgnoreAllDefaultLibraries>
<IgnoreAllDefaultLibraries> <IgnoreSpecificDefaultLibraries>LIBCMT</IgnoreSpecificDefaultLibraries>
</IgnoreAllDefaultLibraries> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<IgnoreSpecificDefaultLibraries>LIBCMT</IgnoreSpecificDefaultLibraries> <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> </Link>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> </ItemDefinitionGroup>
</Link> <ItemGroup>
</ItemDefinitionGroup> <ClInclude Include="Include\Configuration.h" />
<ItemGroup> <ClInclude Include="Include\Discord.h" />
<ClInclude Include="Include\Configuration.h" /> <ClInclude Include="Include\Hooks\Context.h" />
<ClInclude Include="Include\Discord.h" /> <ClInclude Include="Include\Hooks\CRoblox.h" />
<ClInclude Include="Include\Hooks\Context.h" /> <ClInclude Include="Include\Hooks\DataModel.h" />
<ClInclude Include="Include\Hooks\CRoblox.h" /> <ClInclude Include="Include\Hooks\StandardOut.h" />
<ClInclude Include="Include\Hooks\DataModel.h" /> <ClInclude Include="Include\Hooks\ServerReplicator.h" />
<ClInclude Include="Include\Hooks\StandardOut.h" /> <ClInclude Include="Include\Hooks\Http.h" />
<ClInclude Include="Include\Hooks\ServerReplicator.h" /> <ClInclude Include="Include\Server.h" />
<ClInclude Include="Include\Hooks\Http.h" /> <ClInclude Include="Include\Patches.h" />
<ClInclude Include="Include\Server.h" /> <ClInclude Include="Include\pch.h" />
<ClInclude Include="Include\Patches.h" /> <ClInclude Include="Include\Helpers.h" />
<ClInclude Include="Include\pch.h" /> <ClInclude Include="Include\Hooks\Crypt.h" />
<ClInclude Include="Include\Helpers.h" /> <ClInclude Include="Include\resource.h" />
<ClInclude Include="Include\Hooks\Crypt.h" /> </ItemGroup>
<ClInclude Include="Include\resource.h" /> <ItemGroup>
</ItemGroup> <ClCompile Include="Discord.cpp" />
<ItemGroup> <ClCompile Include="Hooks\Context.cpp" />
<ClCompile Include="Discord.cpp" /> <ClCompile Include="dllmain.cpp" />
<ClCompile Include="Hooks\Context.cpp" /> <ClCompile Include="Hooks\CRoblox.cpp" />
<ClCompile Include="dllmain.cpp" /> <ClCompile Include="Hooks\DataModel.cpp" />
<ClCompile Include="Hooks\CRoblox.cpp" /> <ClCompile Include="Server.cpp" />
<ClCompile Include="Hooks\DataModel.cpp" /> <ClCompile Include="Patches.cpp" />
<ClCompile Include="Server.cpp" /> <ClCompile Include="pch.cpp">
<ClCompile Include="Patches.cpp" /> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<ClCompile Include="pch.cpp"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> </ClCompile>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader> <ClCompile Include="Hooks\StandardOut.cpp" />
</ClCompile> <ClCompile Include="Hooks\ServerReplicator.cpp" />
<ClCompile Include="Hooks\StandardOut.cpp" /> <ClCompile Include="Hooks\Http.cpp" />
<ClCompile Include="Hooks\ServerReplicator.cpp" /> <ClCompile Include="Helpers.cpp" />
<ClCompile Include="Hooks\Http.cpp" /> <ClCompile Include="Hooks\Crypt.cpp" />
<ClCompile Include="Helpers.cpp" /> </ItemGroup>
<ClCompile Include="Hooks\Crypt.cpp" /> <ItemGroup>
</ItemGroup> <ResourceCompile Include="Kiseki.DLL.rc" />
<ItemGroup> </ItemGroup>
<ResourceCompile Include="Tadah.DLL.rc" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</ItemGroup> <ImportGroup Label="ExtensionTargets">
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> </ImportGroup>
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project> </Project>

View File

@ -1,113 +1,113 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup> <ItemGroup>
<Filter Include="Source Files"> <Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions> <Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter> </Filter>
<Filter Include="Header Files"> <Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions> <Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter> </Filter>
<Filter Include="Resource Files"> <Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter> </Filter>
<Filter Include="Source Files\Hooks"> <Filter Include="Source Files\Hooks">
<UniqueIdentifier>{e1630ddd-f689-40cc-9f7b-506bcf8aca31}</UniqueIdentifier> <UniqueIdentifier>{e1630ddd-f689-40cc-9f7b-506bcf8aca31}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="Header Files\Hooks"> <Filter Include="Header Files\Hooks">
<UniqueIdentifier>{51130969-bcf1-4ae5-b838-7f4fb658856e}</UniqueIdentifier> <UniqueIdentifier>{51130969-bcf1-4ae5-b838-7f4fb658856e}</UniqueIdentifier>
</Filter> </Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="Include\pch.h"> <ClInclude Include="Include\pch.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Include\Patches.h"> <ClInclude Include="Include\Patches.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Include\Helpers.h"> <ClInclude Include="Include\Helpers.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Include\Hooks\Crypt.h"> <ClInclude Include="Include\Hooks\Crypt.h">
<Filter>Header Files\Hooks</Filter> <Filter>Header Files\Hooks</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Include\Hooks\CRoblox.h"> <ClInclude Include="Include\Hooks\CRoblox.h">
<Filter>Header Files\Hooks</Filter> <Filter>Header Files\Hooks</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Include\Hooks\ServerReplicator.h"> <ClInclude Include="Include\Hooks\ServerReplicator.h">
<Filter>Header Files\Hooks</Filter> <Filter>Header Files\Hooks</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Include\Hooks\StandardOut.h"> <ClInclude Include="Include\Hooks\StandardOut.h">
<Filter>Header Files\Hooks</Filter> <Filter>Header Files\Hooks</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Include\Hooks\Http.h"> <ClInclude Include="Include\Hooks\Http.h">
<Filter>Header Files\Hooks</Filter> <Filter>Header Files\Hooks</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Include\Hooks\Context.h"> <ClInclude Include="Include\Hooks\Context.h">
<Filter>Header Files\Hooks</Filter> <Filter>Header Files\Hooks</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Include\resource.h"> <ClInclude Include="Include\resource.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Include\Discord.h"> <ClInclude Include="Include\Discord.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Include\Server.h"> <ClInclude Include="Include\Server.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Include\Hooks\DataModel.h"> <ClInclude Include="Include\Hooks\DataModel.h">
<Filter>Header Files\Hooks</Filter> <Filter>Header Files\Hooks</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Include\Configuration.h"> <ClInclude Include="Include\Configuration.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="dllmain.cpp"> <ClCompile Include="dllmain.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="pch.cpp"> <ClCompile Include="pch.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Patches.cpp"> <ClCompile Include="Patches.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Helpers.cpp"> <ClCompile Include="Helpers.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Hooks\Crypt.cpp"> <ClCompile Include="Hooks\Crypt.cpp">
<Filter>Source Files\Hooks</Filter> <Filter>Source Files\Hooks</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Hooks\CRoblox.cpp"> <ClCompile Include="Hooks\CRoblox.cpp">
<Filter>Source Files\Hooks</Filter> <Filter>Source Files\Hooks</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Hooks\ServerReplicator.cpp"> <ClCompile Include="Hooks\ServerReplicator.cpp">
<Filter>Source Files\Hooks</Filter> <Filter>Source Files\Hooks</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Hooks\StandardOut.cpp"> <ClCompile Include="Hooks\StandardOut.cpp">
<Filter>Source Files\Hooks</Filter> <Filter>Source Files\Hooks</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Hooks\Http.cpp"> <ClCompile Include="Hooks\Http.cpp">
<Filter>Source Files\Hooks</Filter> <Filter>Source Files\Hooks</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Hooks\Context.cpp"> <ClCompile Include="Hooks\Context.cpp">
<Filter>Source Files\Hooks</Filter> <Filter>Source Files\Hooks</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Discord.cpp"> <ClCompile Include="Discord.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Server.cpp"> <ClCompile Include="Server.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Hooks\DataModel.cpp"> <ClCompile Include="Hooks\DataModel.cpp">
<Filter>Source Files\Hooks</Filter> <Filter>Source Files\Hooks</Filter>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="Tadah.DLL.rc"> <ResourceCompile Include="Kiseki.DLL.rc">
<Filter>Resource Files</Filter> <Filter>Resource Files</Filter>
</ResourceCompile> </ResourceCompile>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,15 +1,15 @@
#include "pch.h" #include "pch.h"
#include "Patches.h" #include "Patches.h"
LONG Patches::Apply() LONG Patches::Apply()
{ {
DetourTransactionBegin(); DetourTransactionBegin();
for (Patch patch : patchList) for (Patch patch : patchList)
{ {
DetourAttach(&(PVOID&)*patch.first, patch.second); DetourAttach(&(PVOID&)*patch.first, patch.second);
} }
return DetourTransactionCommit(); return DetourTransactionCommit();
} }

View File

@ -1,99 +1,99 @@
#include "pch.h" #include "pch.h"
#include "Server.h" #include "Server.h"
#ifdef SERVER #ifdef SERVER
HANDLE Server::Handle; HANDLE Server::Handle;
std::ofstream Server::OutputLog; std::ofstream Server::OutputLog;
std::ofstream Server::HttpLog; std::ofstream Server::HttpLog;
std::string Server::OutputLogPath; std::string Server::OutputLogPath;
std::string Server::HttpLogPath; std::string Server::HttpLogPath;
void Server::Initialize(const std::wstring jobId) void Server::Initialize(const std::wstring jobId)
{ {
std::string _jobId = Helpers::ws2s(jobId); std::string _jobId = Helpers::ws2s(jobId);
std::string signature = "Tadah.DLL v1.0.0"; std::string signature = "Kiseki.Patcher v1.0.0";
#ifdef _DEBUG #ifdef _DEBUG
signature += " (compiled as Debug)"; signature += " (compiled as Debug)";
#endif #endif
AllocConsole(); AllocConsole();
freopen_s((FILE**)stdout, "CONOUT$", "w", stdout); freopen_s((FILE**)stdout, "CONOUT$", "w", stdout);
Server::Handle = CreateFileA("CONOUT$", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); Server::Handle = CreateFileA("CONOUT$", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
SetStdHandle(STD_OUTPUT_HANDLE, Server::Handle); SetStdHandle(STD_OUTPUT_HANDLE, Server::Handle);
printf((signature + "\n\n").c_str()); printf((signature + "\n\n").c_str());
// Initialize file logging // Initialize file logging
fs::create_directory(fs::path(Helpers::getModulePath()).parent_path() / "logs"); fs::create_directory(fs::path(Helpers::getModulePath()).parent_path() / "logs");
OutputLogPath = (fs::path(Helpers::getModulePath()).parent_path() / "logs" / (_jobId + "-Output.log")).string(); OutputLogPath = (fs::path(Helpers::getModulePath()).parent_path() / "logs" / (_jobId + "-Output.log")).string();
HttpLogPath = (fs::path(Helpers::getModulePath()).parent_path() / "logs" / (_jobId + "-Http.log")).string(); HttpLogPath = (fs::path(Helpers::getModulePath()).parent_path() / "logs" / (_jobId + "-Http.log")).string();
OutputLog.open(OutputLogPath, std::ios::out); OutputLog.open(OutputLogPath, std::ios::out);
HttpLog.open(HttpLogPath, std::ios::out); HttpLog.open(HttpLogPath, std::ios::out);
OutputLog << signature << " - StandardOut" << std::endl << std::endl; OutputLog << signature << " - StandardOut" << std::endl << std::endl;
HttpLog << signature << " - Http" << std::endl << std::endl; HttpLog << signature << " - Http" << std::endl << std::endl;
OutputLog.close(); OutputLog.close();
HttpLog.close(); HttpLog.close();
} }
void Server::Log::Output(const LogSeverity severity, const std::string message) void Server::Log::Output(const LogSeverity severity, const std::string message)
{ {
std::string type; std::string type;
std::string time = Helpers::getISOTimestamp(); std::string time = Helpers::getISOTimestamp();
switch (severity) switch (severity)
{ {
case LogSeverity::Output: case LogSeverity::Output:
SetConsoleTextAttribute(Server::Handle, FOREGROUND_BLUE | FOREGROUND_INTENSITY); SetConsoleTextAttribute(Server::Handle, FOREGROUND_BLUE | FOREGROUND_INTENSITY);
type = "out"; type = "out";
break; break;
case LogSeverity::Information: case LogSeverity::Information:
SetConsoleTextAttribute(Server::Handle, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE); SetConsoleTextAttribute(Server::Handle, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
type = "info"; type = "info";
break; break;
case LogSeverity::Warning: case LogSeverity::Warning:
SetConsoleTextAttribute(Server::Handle, FOREGROUND_RED | FOREGROUND_GREEN); SetConsoleTextAttribute(Server::Handle, FOREGROUND_RED | FOREGROUND_GREEN);
type = "warn"; type = "warn";
break; break;
case LogSeverity::Error: case LogSeverity::Error:
type = "err"; type = "err";
SetConsoleTextAttribute(Server::Handle, FOREGROUND_RED | FOREGROUND_INTENSITY); SetConsoleTextAttribute(Server::Handle, FOREGROUND_RED | FOREGROUND_INTENSITY);
break; break;
} }
printf("%s\n", message.c_str()); printf("%s\n", message.c_str());
SetConsoleTextAttribute(Server::Handle, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE); SetConsoleTextAttribute(Server::Handle, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
OutputLog.open(OutputLogPath, std::ios::out); OutputLog.open(OutputLogPath, std::ios::out);
OutputLog << "[" << time << "] [" << type << "] " << message << std::endl; OutputLog << "[" << time << "] [" << type << "] " << message << std::endl;
OutputLog.close(); OutputLog.close();
} }
void Server::Log::Http(const RequestType request, const std::string url) void Server::Log::Http(const RequestType request, const std::string url)
{ {
std::string type; std::string type;
std::string time = Helpers::getISOTimestamp(); std::string time = Helpers::getISOTimestamp();
type = (request == RequestType::GET ? "GET" : "POST"); type = (request == RequestType::GET ? "GET" : "POST");
HttpLog.open(HttpLogPath, std::ios::out); HttpLog.open(HttpLogPath, std::ios::out);
HttpLog << "[" << time << "] [" << type << "] " << "'" << url << "'" << std::endl; HttpLog << "[" << time << "] [" << type << "] " << "'" << url << "'" << std::endl;
HttpLog.close(); HttpLog.close();
} }
void Server::Cleanup() void Server::Cleanup()
{ {
CloseHandle(Server::Handle); CloseHandle(Server::Handle);
OutputLog.close(); OutputLog.close();
HttpLog.close(); HttpLog.close();
} }
#endif #endif

View File

@ -1,101 +1,101 @@
#include "pch.h" #include "pch.h"
#include "Configuration.h" #include "Configuration.h"
#include "Patches.h" #include "Patches.h"
#ifndef SERVER #ifndef SERVER
#include "Discord.h" #include "Discord.h"
#endif #endif
#ifdef SERVER #ifdef SERVER
#include "Server.h" #include "Server.h"
#endif #endif
#include "Hooks/Http.h" #include "Hooks/Http.h"
#include "Hooks/Crypt.h" #include "Hooks/Crypt.h"
#include "Hooks/CRoblox.h" #include "Hooks/CRoblox.h"
#ifdef _DEBUG #ifdef _DEBUG
#include "Hooks/Context.h" #include "Hooks/Context.h"
#endif #endif
#ifdef SERVER #ifdef SERVER
#include "Hooks/DataModel.h" #include "Hooks/DataModel.h"
#include "Hooks/StandardOut.h" #include "Hooks/StandardOut.h"
#include "Hooks/ServerReplicator.h" #include "Hooks/ServerReplicator.h"
#endif #endif
START_PATCH_LIST() START_PATCH_LIST()
ADD_PATCH(Http__httpGetPostWinInet, Http__httpGetPostWinInet_hook) ADD_PATCH(Http__httpGetPostWinInet, Http__httpGetPostWinInet_hook)
ADD_PATCH(Http__trustCheck, Http__trustCheck_hook) ADD_PATCH(Http__trustCheck, Http__trustCheck_hook)
ADD_PATCH(Crypt__verifySignatureBase64, Crypt__verifySignatureBase64_hook) ADD_PATCH(Crypt__verifySignatureBase64, Crypt__verifySignatureBase64_hook)
ADD_PATCH(CRobloxApp__InitInstance, CRobloxApp__InitInstance_hook) ADD_PATCH(CRobloxApp__InitInstance, CRobloxApp__InitInstance_hook)
ADD_PATCH(CRobloxCommandLineInfo__ParseParam, CRobloxCommandLineInfo__ParseParam_hook) ADD_PATCH(CRobloxCommandLineInfo__ParseParam, CRobloxCommandLineInfo__ParseParam_hook)
#ifdef _DEBUG #ifdef _DEBUG
ADD_PATCH(Context__requirePermission, Context__requirePermission_hook) ADD_PATCH(Context__requirePermission, Context__requirePermission_hook)
#endif #endif
#ifdef SERVER #ifdef SERVER
ADD_PATCH(DataModel__getJobId, DataModel__getJobId_hook) ADD_PATCH(DataModel__getJobId, DataModel__getJobId_hook)
ADD_PATCH(StandardOut__print, StandardOut__print_hook) ADD_PATCH(StandardOut__print, StandardOut__print_hook)
ADD_PATCH(ServerReplicator__sendTop, ServerReplicator__sendTop_hook) ADD_PATCH(ServerReplicator__sendTop, ServerReplicator__sendTop_hook)
ADD_PATCH(ServerReplicator__processTicket, ServerReplicator__processTicket_hook) ADD_PATCH(ServerReplicator__processTicket, ServerReplicator__processTicket_hook)
#endif #endif
END_PATCH_LIST() END_PATCH_LIST()
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{ {
if (ul_reason_for_call == DLL_PROCESS_ATTACH) if (ul_reason_for_call == DLL_PROCESS_ATTACH)
{ {
LONG patchesError = Patches::Apply(); LONG patchesError = Patches::Apply();
if (patchesError != NO_ERROR) if (patchesError != NO_ERROR)
{ {
#ifdef _DEBUG #ifdef _DEBUG
std::string message = "Patches::Apply returned " + std::to_string(patchesError); std::string message = "Patches::Apply returned " + std::to_string(patchesError);
MessageBoxA(nullptr, message.c_str(), nullptr, MB_ICONERROR); MessageBoxA(nullptr, message.c_str(), nullptr, MB_ICONERROR);
#endif #endif
ExitProcess(EXIT_FAILURE); ExitProcess(EXIT_FAILURE);
} }
CURLcode curlError = curl_global_init(CURL_GLOBAL_DEFAULT); CURLcode curlError = curl_global_init(CURL_GLOBAL_DEFAULT);
if (curlError != CURLE_OK) if (curlError != CURLE_OK)
{ {
#ifdef _DEBUG #ifdef _DEBUG
std::string message = "curl_global_init returned " + std::to_string(curlError); std::string message = "curl_global_init returned " + std::to_string(curlError);
MessageBoxA(nullptr, message.c_str(), nullptr, MB_ICONERROR); MessageBoxA(nullptr, message.c_str(), nullptr, MB_ICONERROR);
#endif #endif
ExitProcess(EXIT_FAILURE); ExitProcess(EXIT_FAILURE);
} }
} }
if (ul_reason_for_call == DLL_PROCESS_DETACH) if (ul_reason_for_call == DLL_PROCESS_DETACH)
{ {
curl_global_cleanup(); curl_global_cleanup();
#ifdef PLAYER #ifdef PLAYER
Discord::Cleanup(); Discord::Cleanup();
#endif #endif
#ifdef SERVER #ifdef SERVER
if (Server::Handle) if (Server::Handle)
{ {
Server::Cleanup(); Server::Cleanup();
} }
#endif #endif
} }
return TRUE; return TRUE;
} }
#ifdef SERVER #ifdef SERVER
void __declspec(dllexport) melo() {} void __declspec(dllexport) melo() {}
#endif #endif

View File

@ -1,52 +1,5 @@
# Tadah.DLL # Kiseki.Patcher
DLL used for extending game client/server functionality DLL used for extending client/server functionality
Fork of [ProjectPolygon/PolygonDLL](https://github.com/ProjectPolygon/PolygonDLL), which is based off of [ndoesstuff/JoinScriptUrlImpl](https://github.com/ndoesstuff/JoinScriptUrlImpl) as per the MIT license ## License
Copyright (c) Kiseki 2022-2023. All rights reserved. Not for public use.
## CI/CD
Tadah.DLL is available on the Tadah CI. All builds are compiled as release, and a build occurs per push.
- [player-win-x86](https://ci.tadah.sipr/buildConfiguration/Tadah_DLL_PlayerWinX86)
- [studio-win-x86](https://ci.tadah.sipr/buildConfiguration/Tadah_DLL_StudioWinX86)
- [server-win-x86](https://ci.tadah.sipr/buildConfiguration/Tadah_DLL_ServerWinX86)
## Build
Tadah.DLL requires [vcpkg](https://github.com/microsoft/vcpkg) to manage package installation such with libcurl, detours, and rapidjson. Here's a quick way to install vcpkg;
```
> cd <path where vcpkg should be kept; such as C:\vcpkg>
> git clone https://github.com/microsoft/vcpkg
> .\vcpkg\bootstrap-vcpkg.bat
> .\vcpkg\vcpkg integrate install
> .\vcpkg\vcpkg integrate project
```
Tadah.DLL only builds under Win32 for x86 architecture.
## Usage
The DLL is imported with StudPE under the `import` function name for server builds. Otherwise, the DLL should be imported into the executable via VMProtect.
Several preprocessor flags are available that modify how the DLL operates. They are specific to the executable being compiled for. You may read the code for further information.
## Testing
Test trust check:
1. Insert a new brick with decal
2. Try setting decal ID to `http://tadah.rocks` - Should succeed
3. Try setting decal ID to `http://tadah.rocks@example.com` - Should fail
Test extended signature check:
- Run `loadfile("rbxasset://invalid-signature.txt")()` - Should throw an exception
- Run `loadfile("rbxasset://overflow-signature.txt")()` - Should throw an exception
- Run `loadfile("https://polygon.pizzaboxer.xyz/Game/Visit.ashx")()` - Should succeed (if compiled with the Project Polygon public key)
Test command line parameter reimplementation:
- `> RobloxApp.exe -a http://polygondev.pizzaboxer.xyz/Login/Negotiate.ashx -t 0 -j http://polygondev.pizzaboxer.xyz/Game/Visit.ashx`
Test asset redirection:
- Run `game:Load("https://www.roblox.com/Asset?id=1818&version=1")` - Should succeed
1. Insert a new brick with decal
2. Try setting decal ID to `https://www.roblox.com/Thumbs/Asset.ashx?id=1818&x=768&y=432` - Should succeed
3. Try setting decal ID to `https://www.roblox.com/Thumbs/Avatar.ashx?id=1&x=768&y=432` - Should succeed
## License
Copyright (c) Tadah and Project Polygon 2022. All rights reserved. Not for public use.