Compare commits

...

17 Commits

Author SHA1 Message Date
rjindael 4ed3cc97a8
relicense 2024-03-16 01:13:34 -07:00
rj 7df54bd6e1
Update README.md 2024-03-16 01:06:33 -07:00
rj 39e21ffeb3
Merge pull request #10 from kiseki-lol/feature/enhanced-server
Enhanced server
2024-03-16 01:03:53 -07:00
rj ad5470b331
Merge branch 'trunk' into feature/enhanced-server 2024-03-16 01:03:47 -07:00
rj a9b488e7c5
Merge pull request #9 from kiseki-lol/feature/discord-rich-presence
Discord Rich Presence
2024-03-16 01:02:45 -07:00
rj e980ebe3ee
Merge branch 'trunk' into feature/discord-rich-presence 2024-03-16 01:02:39 -07:00
rj a2b103ec4b
license 2024-03-12 22:58:05 -07:00
rj e09b9202e4
notice 2024-03-12 22:56:31 -07:00
rj 2659c5eec1
license: fix copyright year 2023-12-18 00:55:20 -08:00
rj c15e74fcd4
Merge pull request #3 from kiseki-lol/trunk
fix: redefine macro properly
2023-09-07 20:48:05 -07:00
rj fb2c154479
Merge pull request #4 from kiseki-lol/trunk
fix: redefine macro properly
2023-09-07 20:48:03 -07:00
rjindael b044f10e52
feat: enhanced server, hook DataModel and StandardOut 2023-09-07 16:17:02 -07:00
rjindael 1f765381c3
feat: parse AppSettings for BaseUrl and fixes 2023-09-07 16:02:32 -07:00
rjindael b3e5853224
feat: add discord libs to cmake 2023-09-07 15:45:48 -07:00
rjindael d97e23e111
feat: add discord rich presence integration code 2023-09-07 15:45:19 -07:00
rjindael 8ead8d78b9
feat: add rapidjson to vcpkg 2023-09-07 15:45:08 -07:00
rjindael d2142f7de5
feat: add discord lib to vcpkg 2023-09-07 15:42:02 -07:00
21 changed files with 686 additions and 7 deletions

View File

@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 3.4)
set(CMAKE_CXX_STANDARD 17)
# TODO: This shouldn't be necessary.
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
project(Kiseki.Patcher VERSION 1.0.0)
option(COMPILE_PLAYER "Include player-specific code" OFF)

View File

@ -26,10 +26,29 @@ if(COMPILE_PLAYER OR COMPILE_SERVER)
list(APPEND SOURCE Source/Hooks/CRoblox.cpp)
list(APPEND HEADER Header/Hooks/CRoblox.hpp)
if(COMPILE_PLAYER)
# Discord Rich Presence integration
list(APPEND SOURCE Source/Discord.cpp)
list(APPEND HEADER Header/Discord.hpp)
endif()
if(COMPILE_SERVER)
# Hook ServerReplicator
list(APPEND SOURCE Source/Hooks/ServerReplicator.cpp)
list(APPEND HEADER Header/Hooks/ServerReplicator.hpp)
# Hook DataModel, ServerReplicator, and StandardOut as well as include our custom server interface
list(APPEND SOURCE
Source/Server.cpp
Source/Hooks/DataModel.cpp
Source/Hooks/ServerReplicator.cpp
Source/Hooks/StandardOut.cpp
)
list(APPEND HEADER
Header/Server.hpp
Header/Hooks/DataModel.hpp
Header/Hooks/ServerReplicator.hpp
Header/Hooks/StandardOut.hpp
)
endif()
endif()
@ -47,6 +66,11 @@ target_link_libraries(Kiseki.Patcher PRIVATE CURL::libcurl ${DETOURS_LIBRARY} ra
# Target-specific linking and compile options
if(COMPILE_PLAYER)
find_path(DISCORD_RPC_INCLUDE_DIRS "discord_rpc.h")
find_library(DISCORD_RPC_LIBRARY discord-rpc REQUIRED)
target_include_directories(Kiseki.Patcher PRIVATE ${DISCORD_RPC_INCLUDE_DIRS})
target_link_libraries(Kiseki.Patcher PRIVATE ${DISCORD_RPC_LIBRARY})
target_compile_definitions(Kiseki.Patcher PRIVATE PLAYER)
endif()

View File

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

View File

@ -7,9 +7,19 @@
#define PUBLIC_KEY 0x06, 0x02, 0x00, 0x00, 0x00, 0xA4, 0x00, 0x00, 0x52, 0x53, 0x41, 0x31, 0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0xA5, 0x11, 0xD0, 0x9F, 0xAB, 0x9B, 0x3A, 0x96, 0xC5, 0xBE, 0x50, 0xBB, 0xCA, 0x0C, 0xBB, 0xC8, 0x1A, 0x9C, 0xC1, 0x2F, 0x22, 0x7A, 0x80, 0x2C, 0x31, 0x01, 0xE1, 0x21, 0xC2, 0x7F, 0xE0, 0x10, 0xA1, 0x2D, 0x09, 0xED, 0x10, 0x3E, 0x28, 0xB9, 0xBD, 0x0F, 0x38, 0xDB, 0x52, 0x78, 0xC0, 0xEC, 0x04, 0xD4, 0x00, 0xAD, 0x45, 0xD3, 0xC7, 0x78, 0xF2, 0x83, 0xB5, 0x5B, 0x16, 0x0C, 0x32, 0x5D, 0xB3, 0x3B, 0xDA, 0xA2, 0x9C, 0x73, 0xB2, 0x0C, 0x09, 0x93, 0xD8, 0xF8, 0xD9, 0xC5, 0x75, 0xAB, 0x33, 0x19, 0xD3, 0x6A, 0xAF, 0x20, 0x21, 0x6C, 0x78, 0x31, 0x41, 0xD1, 0xCD, 0x6D, 0x4D, 0xA1, 0x6D, 0x49, 0x3A, 0x6A, 0x33, 0x10, 0x6D, 0x52, 0x33, 0x4A, 0x10, 0x32, 0x3D, 0x42, 0xE6, 0xEC, 0x38, 0x97, 0x2F, 0x05, 0x41, 0xDD, 0xD6, 0xB6, 0xAC, 0x17, 0x4B, 0x7E, 0xFA, 0xFE, 0xA4, 0xD2
#define RBX__MESSAGE_INFO 0
#define RBX__MESSAGE_OUTPUT 1
#define RBX__MESSAGE_WARNING 2
#define RBX__MESSAGE_ERROR 3
#define CLASSPADDING_DATAMODEL__JOBID 739
#define ADDRESS_HTTP__HTTPGETPOSTWININET 0x006F03B0
#define ADDRESS_HTTP__TRUSTCHECK 0x005B7050
#define ADDRESS_CRYPT__VERIFYSIGNATUREBASE64 0x00809EC0
#define ADDRESS_DATAMODEL__GETJOBID 0x005E70C0
#define ADDRESS_CRYPT__VERIFYSIGNATUREBASE64 0x00809EC0
#define ADDRESS_STANDARDOUT__PRINT 0x005B25E0
#define ADDRESS_SERVERREPLICATOR__SENDTOP 0x00513E80
#define ADDRESS_SERVERREPLICATOR__PROCESSTICKET 0x00514B60

View File

@ -8,6 +8,7 @@
#include <map>
#include <curl/curl.h>
#include <pugixml.hpp>
#include "Globals.hpp"
@ -31,4 +32,5 @@ public:
static std::pair<bool, std::map<std::string, std::string>> parseURL(const std::string url);
static std::string getRedirectURL(const std::string url);
static std::pair<bool, std::string> httpGet(const std::string url);
static std::string getBaseUrl();
};

View File

@ -7,6 +7,14 @@
#include "Globals.hpp"
#include "Helpers.hpp"
#ifdef SERVER
#include "Server.hpp"
#endif
#ifdef PLAYER
#include "Discord.hpp"
#endif
class CWorkspace;
const auto CWorkspace__ExecUrlScript = (HRESULT(__stdcall*)(CWorkspace * workspace, LPCWSTR, VARIANTARG, VARIANTARG, VARIANTARG, VARIANTARG, LPVOID))ADDRESS_CWORKSPACE__EXECURLSCRIPT;
@ -44,4 +52,9 @@ void __fastcall CRobloxCommandLineInfo__ParseParam_hook(CRobloxCommandLineInfo*
extern CRobloxApp__InitInstance_t CRobloxApp__InitInstance;
extern CRobloxCommandLineInfo__ParseParam_t CRobloxCommandLineInfo__ParseParam;
#ifdef SERVER
extern std::wstring jobId;
extern bool hasJobId;
#endif
#endif

View File

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

View File

@ -0,0 +1,14 @@
#ifdef SERVER
#pragma once
#include "Globals.hpp"
#include "Helpers.hpp"
#include "Patcher.hpp"
#include "Server.hpp"
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);
extern StandardOut__print_t StandardOut__print;
#endif

View File

@ -0,0 +1,37 @@
#ifdef SERVER
#pragma once
#include <filesystem>
#include <fstream>
#include "Hooks/StandardOut.hpp"
#include "Globals.hpp"
#include "Helpers.hpp"
enum class LogSeverity {
Information = RBX__MESSAGE_INFO,
Output = RBX__MESSAGE_OUTPUT,
Warning = RBX__MESSAGE_WARNING,
Error = RBX__MESSAGE_ERROR
};
class Server {
public:
static HANDLE Handle;
static void Initialize(const std::wstring jobId);
static void Cleanup();
struct Log
{
static void Output(const LogSeverity severity, const std::string message);
};
private:
static std::string OutputLogPath;
static std::ofstream OutputLog;
};
#endif

View File

@ -9,4 +9,4 @@
#define APP_NAME "Kiseki.Patcher"
#define APP_DESCRIPTION "Client functionality library"
#define APP_ORGANIZATION "Kiseki"
#define APP_COPYRIGHT "Copyright (c) Kiseki 2023"
#define APP_LICENSE "This program is licensed under the Apache License 2.0."

View File

@ -24,7 +24,7 @@ BEGIN
VALUE "CompanyName", APP_ORGANIZATION "\0"
VALUE "FileDescription", APP_DESCRIPTION "\0"
VALUE "FileVersion", VERSION_FULL_STR "\0"
VALUE "LegalCopyright", APP_COPYRIGHT "\0"
VALUE "LegalCopyright", APP_LICENSE "\0"
VALUE "ProductName", APP_NAME "\0"
VALUE "ProductVersion", VERSION_FULL_STR "\0"
END

View File

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

View File

@ -250,3 +250,27 @@ std::pair<bool, std::string> Helpers::httpGet(const std::string url)
return std::make_pair(true, data);
}
std::string Helpers::getBaseUrl()
{
std::string path = Helpers::getModulePath();
path = path.substr(0, path.find_last_of("\\/"));
pugi::xml_document document;
pugi::xml_parse_result result = document.load_file((path + "\\AppSettings.xml").c_str());
if (!result)
{
return "";
}
pugi::xml_node settings = document.child("Settings");
pugi::xml_node baseUrl = settings.child("BaseUrl");
if (!baseUrl)
{
return "";
}
return baseUrl.child_value();
}

View File

@ -10,6 +10,11 @@ std::wstring authenticationUrl;
std::wstring authenticationTicket;
std::wstring joinScriptUrl;
#ifdef SERVER
bool hasJobId = false;
std::wstring jobId;
#endif
CRobloxApp__InitInstance_t CRobloxApp__InitInstance = (CRobloxApp__InitInstance_t)ADDRESS_CROBLOXAPP__INITINSTANCE;
CRobloxCommandLineInfo__ParseParam_t CRobloxCommandLineInfo__ParseParam = (CRobloxCommandLineInfo__ParseParam_t)ADDRESS_CROBLOXCOMMANDLINEINFO__PARSEPARAM;
@ -45,6 +50,16 @@ BOOL __fastcall CRobloxApp__InitInstance_hook(CRobloxApp* _this)
}
#endif
#ifdef SERVER
if (!hasJobId)
{
#ifdef _DEBUG
MessageBoxW(nullptr, L"Missing job ID", L"Kiseki", MB_OK | MB_ICONERROR);
#endif
return FALSE;
}
#endif
CApp* app = reinterpret_cast<CApp*>(CLASSLOCATION_CAPP);
if (hasAuthenticationUrl && hasAuthenticationTicket && !authenticationUrl.empty() && !authenticationTicket.empty())
@ -79,6 +94,10 @@ void __fastcall CRobloxCommandLineInfo__ParseParam_hook(CRobloxCommandLineInfo*
_this->m_bRunAutomated = TRUE;
CCommandLineInfo__ParseLast(_this, bLast);
#ifdef PLAYER
Discord::Initialize(Helpers::ws2s(joinScriptUrl));
#endif
}
if (hasAuthenticationUrl && authenticationUrl.empty())
@ -101,6 +120,18 @@ void __fastcall CRobloxCommandLineInfo__ParseParam_hook(CRobloxCommandLineInfo*
return;
}
#ifdef SERVER
if (hasJobId && jobId.empty())
{
int size = MultiByteToWideChar(CP_ACP, 0, pszParam, strlen(pszParam), nullptr, 0);
jobId.resize(size);
MultiByteToWideChar(CP_ACP, 0, pszParam, strlen(pszParam), &jobId[0], size);
CCommandLineInfo__ParseLast(_this, bLast);
return;
}
#endif
if (bFlag && _stricmp(pszParam, "a") == 0)
{
hasAuthenticationUrl = true;
@ -122,6 +153,18 @@ void __fastcall CRobloxCommandLineInfo__ParseParam_hook(CRobloxCommandLineInfo*
return;
}
#ifdef SERVER
if (bFlag && _stricmp(pszParam, "jobId") == 0)
{
hasJobId = true;
CCommandLineInfo__ParseLast(_this, bLast);
Server::Initialize(jobId);
return;
}
#endif
CRobloxCommandLineInfo__ParseParam(_this, pszParam, bFlag, bLast);
}

View File

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

View File

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

View File

@ -0,0 +1,78 @@
#ifdef SERVER
#include "Server.hpp"
HANDLE Server::Handle;
std::ofstream Server::OutputLog;
std::string Server::OutputLogPath;
void Server::Initialize(const std::wstring jobId)
{
std::string _jobId = Helpers::ws2s(jobId);
std::string signature = "Kiseki.Patcher v1.0.0";
#ifdef _DEBUG
signature += " (compiled as Debug)";
#endif
AllocConsole();
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);
SetStdHandle(STD_OUTPUT_HANDLE, Server::Handle);
printf((signature + "\n\n").c_str());
// Initialize file logging
std::filesystem::create_directory(std::filesystem::path(Helpers::getModulePath()).parent_path() / "logs");
OutputLogPath = (std::filesystem::path(Helpers::getModulePath()).parent_path() / "logs" / (_jobId + "-Output.log")).string();
OutputLog.open(OutputLogPath, std::ios::out);
OutputLog << signature << " - StandardOut" << std::endl << std::endl;
OutputLog.close();
}
void Server::Log::Output(const LogSeverity severity, const std::string message)
{
std::string type;
std::string time = Helpers::getISOTimestamp();
switch (severity)
{
case LogSeverity::Output:
SetConsoleTextAttribute(Server::Handle, FOREGROUND_BLUE | FOREGROUND_INTENSITY);
type = "out";
break;
case LogSeverity::Information:
SetConsoleTextAttribute(Server::Handle, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
type = "info";
break;
case LogSeverity::Warning:
SetConsoleTextAttribute(Server::Handle, FOREGROUND_RED | FOREGROUND_GREEN);
type = "warn";
break;
case LogSeverity::Error:
type = "err";
SetConsoleTextAttribute(Server::Handle, FOREGROUND_RED | FOREGROUND_INTENSITY);
break;
}
printf("%s\n", message.c_str());
SetConsoleTextAttribute(Server::Handle, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
OutputLog.open(OutputLogPath, std::ios::out);
OutputLog << "[" << time << "] [" << type << "] " << message << std::endl;
OutputLog.close();
}
void Server::Cleanup()
{
CloseHandle(Server::Handle);
OutputLog.close();
}
#endif

View File

@ -3,11 +3,20 @@
#include "Globals.hpp"
#include "Patcher.hpp"
#ifdef SERVER
#include "Server.hpp"
#endif
#ifdef PLAYER
#include "Discord.hpp"
#endif
#include "Hooks/Http.hpp"
#include "Hooks/Crypt.hpp"
#include "Hooks/CRoblox.hpp"
#ifdef SERVER
#include "Hooks/DataModel.hpp"
#include "Hooks/ServerReplicator.hpp"
#endif
@ -24,6 +33,10 @@ ADD_PATCH(CRobloxCommandLineInfo__ParseParam, CRobloxCommandLineInfo__ParseParam
#endif
#ifdef SERVER
ADD_PATCH(DataModel__getJobId, DataModel__getJobId_hook)
ADD_PATCH(StandardOut__print, StandardOut__print_hook)
ADD_PATCH(ServerReplicator__sendTop, ServerReplicator__sendTop_hook)
ADD_PATCH(ServerReplicator__processTicket, ServerReplicator__processTicket_hook)
#endif
@ -60,6 +73,10 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserv
if (ul_reason_for_call == DLL_PROCESS_DETACH)
{
curl_global_cleanup();
#ifdef PLAYER
Discord::Cleanup();
#endif
}
return TRUE;

202
LICENSE Normal file
View File

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -1,9 +1,12 @@
# Kiseki.Patcher
> [!IMPORTANT]
> This project has been merged into [@lrre-foss/lure](https://github.com/lrre-foss/lure). This repository will no longer receive updates and will remain archived. Please send all pull requests and bug fixes to that repository instead.
Client functionality library
## License
Copyright (c) Kiseki 2023. All rights reserved. Not for public use.
Kiseki.Patcher is licensed under the [Apache License 2.0](https://github.com/kiseki-lol/patcher/blob/trunk/LICENSE). A copy of it has been included with Kiseki.Patcher.
Kiseki.Patcher is adapted from [@lrre-foss/lure](https://github.com/lrre-foss/lure), a project licensed under the [Apache License 2.0](https://github.com/lrre-foss/lure/blob/trunk/LICENSE).
Kiseki.Patcher is a fork of [@lrre-foss/lure](https://github.com/lrre-foss/lure), a project licensed also under the Apache License 2.0.

View File

@ -5,6 +5,7 @@
"dependencies": [
"curl",
"detours",
"discord-rpc",
"rapidjson"
]
}