Sleazy Fork is available in English.

Powerline.io infinite score and length

Exploits debugging capabilities in the Powerline.io server to grant infinite score and length

  1. // ==UserScript==
  2. // @name Powerline.io infinite score and length
  3. // @namespace http://tampermonkey.net/
  4. // @version 1
  5. // @description Exploits debugging capabilities in the Powerline.io server to grant infinite score and length
  6. // @author ww
  7. // @match http://powerline.io/*
  8. // @grant unsafeWindow
  9. // ==/UserScript==
  10.  
  11. (() => {
  12. var _WebSocket = unsafeWindow.WebSocket; // Copy the WebSocket constructor (to be hooked)
  13. let ws = null, // Current WebSocket the client is connected to
  14. handshakeCompleted = false; // whether or not the initial client handshake is complete
  15. unsafeWindow.WebSocket = function(address, protocol) {
  16. ws = new _WebSocket(address, protocol);
  17. var _send = ws.send; // Copy native send method
  18. ws.send = function() { // Intercept outgoing traffic
  19. const msg = new Uint8Array(arguments[0]);
  20. if (msg[0] == 1) { // If the first byte of the packet is 1, the packet is a handshake packet
  21. msg[0] = 171; // Change the byte to '171' which is the byte needed to enable debugging server-side
  22. console.log('Modified handshake packet and enabled debugging.');
  23. handshakeCompleted = true;
  24. arguments[0] = msg.buffer; // Re-encode Uint8Array to ArrayBuffer
  25. }
  26. return _send.apply(this, arguments); // Call native send method within the context of this WebSocket.
  27. }
  28. console.log('Modified WebSocket with address', address);
  29. return ws;
  30. }
  31. setInterval(() => {
  32. if (ws && handshakeCompleted) { // If the WebSocket exists and the handshake is completed
  33. /*
  34. To increase your score, length, and speed as a debug client
  35. all that's needed is to send a one-byte packet that consists of 0x9
  36. */
  37. const packet = new Uint8Array([0x9]).buffer;
  38. ws.send(packet); // Send the packet
  39. }
  40. }, 100); // 100ms to unite network performance and score generation
  41. })();