diff --git a/src/unlocker/xbox-fixes.cpp b/src/unlocker/xbox-fixes.cpp index 824c799..408ea0a 100644 --- a/src/unlocker/xbox-fixes.cpp +++ b/src/unlocker/xbox-fixes.cpp @@ -1,16 +1,27 @@ #include "xbox-fixes.h" +#include + XboxFixes::XboxFixes() {} XboxFixes::~XboxFixes() {} +void XboxFixes::registerListeners(TinyMITMProxy* proxy) +{ + proxy->onServerResponse.addListener( + [this](const std::string& url, std::string& body, std::string& headers, bool wasBlocked) { + this->serverResponseHandler(url, body, headers, wasBlocked); + }); +} + void XboxFixes::antiCensor(std::string& body) { body = R"-({"verifyStringResult":[{"resultCode":0,"offendingString":null}]})-"; } void XboxFixes::serverResponseHandler(const std::string& url, std::string& body, std::string& /*headers*/, - bool& /*blockOutgoing*/) { + bool& /*blockOutgoing*/) +{ if (url.find("xboxlive.com") == std::string::npos) return; if (url.ends_with("/system/strings/validate")) return antiCensor(body);