Skip to content

Instantly share code, notes, and snippets.

@omakmoh
Created October 20, 2021 23:58
Show Gist options
  • Save omakmoh/0df93eb64127a13cc548dcb0d5ca3bad to your computer and use it in GitHub Desktop.
Save omakmoh/0df93eb64127a13cc548dcb0d5ca3bad to your computer and use it in GitHub Desktop.
The code used for spoof mute/deafen in Discord PC
var text = new TextDecoder("utf-8");
WebSocket.prototype.original = WebSocket.prototype.send;
WebSocket.prototype.send = function(data) {
if (Object.prototype.toString.call(data) === "[object ArrayBuffer]") {
if (text.decode(data).includes("self_deaf")) {
console.log("Exploit done.");
data = data.replace('"self_mute":false', 'dummydata');
}
}
WebSocket.prototype.original.apply(this, [data]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment