diff --git a/Cobalt/curlhook.h b/Cobalt/curlhook.h index 1c2c30a..e970537 100644 --- a/Cobalt/curlhook.h +++ b/Cobalt/curlhook.h @@ -55,18 +55,46 @@ inline CURLcode CurlEasySetOptDetour(struct Curl_easy* data, CURLoption tag, ... Uri uri = Uri::Parse(url); -#ifdef URL_HOST + // std::cout << "Path: " << uri.Path << '\n'; +#ifdef URL_HOST if (uri.Host.ends_with(XOR("ol.epicgames.com")) || uri.Host.ends_with(XOR(".akamaized.net")) || uri.Host.ends_with(XOR("on.epicgames.com")) || uri.Host.ends_with(XOR("game-social.epicgames.com")) || uri.Host.contains(XOR("superawesome.com"))) { - url = Uri::CreateUri(URL_PROTOCOL, URL_HOST, URL_PORT, uri.Path, uri.QueryString); + if (CobaltUsage == ECobaltUsage::Private) + { + url = Uri::CreateUri(URL_PROTOCOL, URL_HOST, URL_PORT, uri.Path, uri.QueryString); + } + else if (CobaltUsage == ECobaltUsage::Hybrid) + { + if (CobaltUsage == ECobaltUsage::Hybrid) { + if (uri.Path.contains("/fortnite/api/v2/versioncheck/")) { + url = Uri::CreateUri(URL_PROTOCOL, URL_HOST, URL_PORT, uri.Path, uri.QueryString); + } + else if (uri.Path.contains("/fortnite/api/game/v2/profile")) { + url = Uri::CreateUri(URL_PROTOCOL, URL_HOST, URL_PORT, uri.Path, uri.QueryString); + } + else if (uri.Path.contains("/content/api/pages/fortnite-game")) { + url = Uri::CreateUri(URL_PROTOCOL, URL_HOST, URL_PORT, uri.Path, uri.QueryString); + } + else if (uri.Path.contains("/affiliate/api/public/affiliates/slug")) { + url = Uri::CreateUri(URL_PROTOCOL, URL_HOST, URL_PORT, uri.Path, uri.QueryString); + } + else if (uri.Path.contains("/socialban/api/public/v1")) { + url = Uri::CreateUri(URL_PROTOCOL, URL_HOST, URL_PORT, uri.Path, uri.QueryString); + } + else if (uri.Path.contains("/fortnite/api/cloudstorage/system")) { + url = Uri::CreateUri(URL_PROTOCOL, URL_HOST, URL_PORT, uri.Path, uri.QueryString); + } + } + } } #endif + result = CurlSetOpt_(data, tag, url.c_str()); } diff --git a/Cobalt/dllmain.cpp b/Cobalt/dllmain.cpp index 33e5732..19499d0 100644 --- a/Cobalt/dllmain.cpp +++ b/Cobalt/dllmain.cpp @@ -97,6 +97,10 @@ DWORD WINAPI Main(LPVOID) freopen_s(&fptr, "CONOUT$", "w+", stdout); #endif SHOW_WINDOWS_CONSOLE +#ifndef URL_HOST + std::cout << "\n\n\n!!!!!!! URL_HOST IS NOT DEFINED !!!!!!!\n\n\n\n"; +#endif + std::cout << "Initializing Cobalt (made by Milxnor#3531).\n"; std::cout << "Credits\n\n"; diff --git a/Cobalt/settings.h b/Cobalt/settings.h index 959112f..7dae26e 100644 --- a/Cobalt/settings.h +++ b/Cobalt/settings.h @@ -1,7 +1,16 @@ #pragma once +enum class ECobaltUsage +{ + Private, + Hybrid, + // RecordingRequests // todo? +}; + #define URL_PROTOCOL "http" #define URL_HOST "127.0.0.1" #define URL_PORT "3551" -// #define SHOW_WINDOWS_CONSOLE \ No newline at end of file +#define SHOW_WINDOWS_CONSOLE + +constexpr static ECobaltUsage CobaltUsage = ECobaltUsage::Private; \ No newline at end of file diff --git a/README.md b/README.md index b5298bc..cdfc769 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Go to `settings.h` and change URL_HOST and URL_PORT to what you want. Go to `settings.h` and change the variable `CobaltUsage` to `ECobaltUsage::Hybrid`. -# How to connect to XMPP with fiddler open () +# How to connect to XMPP with fiddler open Thanks [Lawin](https://github.com/Lawin0129) for this method.
All you have to do is put this into your fiddler script.