From de561d5170dfc9fc7b1888fb3fb4d8618c83be79 Mon Sep 17 00:00:00 2001 From: neru Date: Wed, 24 Jun 2026 02:20:21 -0300 Subject: [PATCH] fix: commit missing stuff --- src/unlocker/xbox-fixes.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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);