slight fix

This commit is contained in:
lightbulblighter 2022-06-04 15:36:54 -07:00
parent 82e3457ac7
commit 7555fe8f0e
No known key found for this signature in database
GPG Key ID: 0B2452F9DE0E2D01
1 changed files with 4 additions and 7 deletions

View File

@ -10,22 +10,19 @@ void __fastcall Http__httpGetPostWinInet_hook(Http* _this, void*, bool isPost, i
LUrlParser::ParseURL parsedUrl = LUrlParser::ParseURL::parseURL(_this->url); LUrlParser::ParseURL parsedUrl = LUrlParser::ParseURL::parseURL(_this->url);
std::string urlPath = Util::toLower(parsedUrl.path_); std::string urlPath = Util::toLower(parsedUrl.path_);
bool flip = false; Http _changed = *_this;
Http _changed;
if (parsedUrl.host_ == "roblox.com" || parsedUrl.host_ == "www.roblox.com") if (parsedUrl.host_ == "roblox.com" || parsedUrl.host_ == "www.roblox.com")
{ {
if (urlPath == "asset" || urlPath == "asset/" || urlPath == "asset/default.ashx") if (urlPath == "asset" || urlPath == "asset/" || urlPath == "asset/default.ashx")
{ {
flip = true;
_changed.url = "https://assetdelivery.roblox.com/v1/asset/?" + parsedUrl.query_; _changed.url = "https://assetdelivery.roblox.com/v1/asset/?" + parsedUrl.query_;
} }
} }
printf("\n"); printf("\n");
if (flip) _this = &_changed;
Http__httpGetPostWinInet(&_changed, isPost, a3, compressData, additionalHeaders, a6);
else Http__httpGetPostWinInet(_this, isPost, a3, compressData, additionalHeaders, a6);
Http__httpGetPostWinInet(_this, isPost, a3, compressData, additionalHeaders, a6);
} }