@@ -1,16 +1,27 @@
|
|||||||
#include "xbox-fixes.h"
|
#include "xbox-fixes.h"
|
||||||
|
|
||||||
|
#include <tinymitm/proxy.h>
|
||||||
|
|
||||||
XboxFixes::XboxFixes() {}
|
XboxFixes::XboxFixes() {}
|
||||||
|
|
||||||
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)
|
void XboxFixes::antiCensor(std::string& body)
|
||||||
{
|
{
|
||||||
body = R"-({"verifyStringResult":[{"resultCode":0,"offendingString":null}]})-";
|
body = R"-({"verifyStringResult":[{"resultCode":0,"offendingString":null}]})-";
|
||||||
}
|
}
|
||||||
|
|
||||||
void XboxFixes::serverResponseHandler(const std::string& url, std::string& body, std::string& /*headers*/,
|
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.find("xboxlive.com") == std::string::npos) return;
|
||||||
|
|
||||||
if (url.ends_with("/system/strings/validate")) return antiCensor(body);
|
if (url.ends_with("/system/strings/validate")) return antiCensor(body);
|
||||||
|
|||||||
Reference in New Issue
Block a user