mirror of
https://github.com/Milxnor/Cobalt.git
synced 2026-01-13 02:22:22 +01:00
add s13 hybrid support untested
This commit is contained in:
@@ -23,6 +23,15 @@ inline CURLcode CurlSetOpt_(struct Curl_easy* data, CURLoption option, ...)
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string ReplaceString(std::string subject, const std::string& search, const std::string& replace) {
|
||||
size_t pos = 0;
|
||||
while ((pos = subject.find(search, pos)) != std::string::npos) {
|
||||
subject.replace(pos, search.length(), replace);
|
||||
pos += replace.length();
|
||||
}
|
||||
return subject;
|
||||
}
|
||||
|
||||
#define XOR
|
||||
|
||||
inline CURLcode CurlEasySetOptDetour(struct Curl_easy* data, CURLoption tag, ...)
|
||||
@@ -53,6 +62,13 @@ inline CURLcode CurlEasySetOptDetour(struct Curl_easy* data, CURLoption tag, ...
|
||||
|
||||
Uri uri = Uri::Parse(url);
|
||||
|
||||
if (bIsS13Epic)
|
||||
{
|
||||
// this *should* work
|
||||
uri.QueryString = ReplaceString(uri.QueryString.data(), "Windows", "IOS");
|
||||
url = ReplaceString(uri.QueryString.data(), "Windows", "IOS"); // Uhh this should be fine
|
||||
}
|
||||
|
||||
std::cout << "URL: " << uri.Host << uri.Path << '\n';
|
||||
|
||||
#if defined(URL_HOST) && defined(URL_PROTOCOL) && defined(URL_PORT)
|
||||
|
||||
@@ -82,7 +82,7 @@ bool InitializeCurlHook()
|
||||
CurlSetOptAddr = sigscan("48 89 5C 24 08 48 89 6C 24 10 56 57 41 56 48 83 EC 50 33 ED 49 8B F0 8B DA 48 8B F9");
|
||||
|
||||
if (!CurlSetOptAddr)
|
||||
CurlSetOptAddr = sigscan("48 89 5C 24 ? 55 56 57 41 56 41 57 48 83 EC 50 33 DB 49 8B F0 48 8B F9 8B EB 81 FA"); // tested 28.00
|
||||
CurlSetOptAddr = sigscan("48 89 5C 24 ? 55 56 57 41 56 41 57 48 83 EC 50 33 DB 49 8B F0 48 8B F9 8B EB 81 FA"); // tested 28.00 // fixed crash
|
||||
}
|
||||
|
||||
if (!CurlSetOptAddr)
|
||||
|
||||
@@ -14,4 +14,5 @@ enum class ECobaltUsage
|
||||
|
||||
#define SHOW_WINDOWS_CONSOLE
|
||||
|
||||
constexpr static ECobaltUsage CobaltUsage = ECobaltUsage::Private;
|
||||
constexpr static ECobaltUsage CobaltUsage = ECobaltUsage::Private;
|
||||
constexpr bool bIsS13Epic = false; // S13 Hybrid Windows -> IOS fake
|
||||
Reference in New Issue
Block a user