summary refs log tree commit diff
path: root/ReferenceClientProxyImplementation/Resources/Private/Injections/WebSocketDumper.html
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-02-23 02:03:20 +0100
committerRory& <root@rory.gay>2026-02-23 02:03:20 +0100
commit77a609758bb80bac9497d2e3988550f8be578407 (patch)
tree991a9d258ca4fece1132a1a344d0fe11e3b03d51 /ReferenceClientProxyImplementation/Resources/Private/Injections/WebSocketDumper.html
downloadReferenceClientProxyImplementation-master.tar.xz
Initial commit HEAD master
Diffstat (limited to '')
-rw-r--r--ReferenceClientProxyImplementation/Resources/Private/Injections/WebSocketDumper.html22
1 files changed, 22 insertions, 0 deletions
diff --git a/ReferenceClientProxyImplementation/Resources/Private/Injections/WebSocketDumper.html b/ReferenceClientProxyImplementation/Resources/Private/Injections/WebSocketDumper.html
new file mode 100644

index 0000000..14dc989 --- /dev/null +++ b/ReferenceClientProxyImplementation/Resources/Private/Injections/WebSocketDumper.html
@@ -0,0 +1,22 @@ +<script> + window.sockets = []; + var lastBuff = ''; + const nativeWebSocket = window.WebSocket; + window.WebSocket = function (...args) { + console.log("Starting new websocket"); + const socket = new nativeWebSocket(...args); + window.sockets.push(socket); + if (!args[0].includes('spotify')) + socket.addEventListener("message", ev => { + console.log("Dumping message..."); + lastBuff = ev.data; + var dat = new Uint8Array(lastBuff); + if (window.toHexString) console.log(window.toHexString(dat)); + var xhr = new XMLHttpRequest; + xhr.open("POST", "http://localhost:2001/dump/cs", false); + xhr.send(ev.data); + }); + console.log("Websocket hooked!", socket); + return socket; + }; +</script> \ No newline at end of file