Skip to content

Instantly share code, notes, and snippets.

@LiEnby
Last active October 4, 2022 21:25
Show Gist options
  • Save LiEnby/50a39a81b6f6073f2782df0bcc528326 to your computer and use it in GitHub Desktop.
Save LiEnby/50a39a81b6f6073f2782df0bcc528326 to your computer and use it in GitHub Desktop.
"id.sonyentertainmentnetwork.com"==window.location.host?(XMLHttpRequest.prototype.openOg=XMLHttpRequest.prototype.open,XMLHttpRequest.prototype.open=function(e,a,t){return"PUT"==e&&a.includes("avatar")?(this.sendOg=this.send,this.send=function(e){return console.log(e+' -> {"avatarId": 0}'),this.sendOg('{"avatarId": 0}')}):"PUT"==e&&a.includes("communication")&&(this.sendOg=this.send,this.send=function(e){return realNameData=JSON.parse(e),window.confirm('Remove real name? (Press OK)\nor set it to blank str " " (Press CANCEL)\n\n"Im about to end this mans whole carrier"')?(realNameData.realName.name.first="",realNameData.realName.name.middle="",realNameData.realName.name.last=""):(realNameData.realName.name.first=" ",realNameData.realName.name.middle="",realNameData.realName.name.last=" "),newBody=JSON.stringify(realNameData),console.log(e+" -> "+newBody),this.sendOg(newBody)}),this.openOg(e,a,t)},alert("PSN Default Avatar / RealName Removal Script by SilicaAndPina!\n\nSimply set a new Avatar or RealName with this script active. And it will be reverted.")):alert('Wrong domain! please run on\n"https://id.sonyentertainmentnetwork.com/id/management/#/p/psn_profile".');
if(window.location.host == "id.sonyentertainmentnetwork.com")
{
XMLHttpRequest.prototype.openOg = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function(method, url, async){
if(method == "PUT" && url.includes("avatar"))
{
this.sendOg = this.send;
this.send = function(body){
console.log(body + ' -> {"avatarId": 0}');
return this.sendOg('{"avatarId": 0}');
}
}
else if(method == "PUT" && url.includes("communication"))
{
this.sendOg = this.send;
this.send = function(body){
realNameData = JSON.parse(body);
if(window.confirm("Remove real name? (Press OK)\nor set it to blank str \" \" (Press CANCEL)\n\n\"Im about to end this mans whole carrier\"")){
realNameData["realName"]["name"]["first"] = ""
realNameData["realName"]["name"]["middle"] = "";
realNameData["realName"]["name"]["last"] = "";
}
else
{
realNameData["realName"]["name"]["first"] = " "
realNameData["realName"]["name"]["middle"] = "";
realNameData["realName"]["name"]["last"] = " ";
}
newBody = JSON.stringify(realNameData);
console.log(body + ' -> ' + newBody);
return this.sendOg(newBody);
}
}
return this.openOg(method,url,async);
}
alert('PSN Default Avatar / RealName Removal Script by SilicaAndPina!\n\nSimply set a new Avatar or RealName with this script active. And it will be reverted.');
}
else
{
alert('Wrong domain! please run on\n"https://id.sonyentertainmentnetwork.com/id/management/#/p/psn_profile".');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment