MooMoo.io Script Unpatcher (Any Hack) (All patches, fixes packets)

Rewrites packets to most recent version (e.g. 33 -> f)

目前为 2024-12-22 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name MooMoo.io Script Unpatcher (Any Hack) (All patches, fixes packets)
  3. // @namespace http://tampermonkey.net/
  4. // @version 99999999
  5. // @description Rewrites packets to most recent version (e.g. 33 -> f)
  6. // @author JavedPension
  7. // @match *://*.moomoo.io/*
  8. // @require https://gf.qytechs.cn/scripts/423602-msgpack/code/msgpack.js
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. /* How to use
  14.  
  15. Copy and paste the code below to the end of your hack.
  16. This technically will auto-fix all hacks after the first update in 2021.
  17.  
  18. If you do not have msgpack locally referencable, include the `// @require` line in your mod metadata as done above.
  19.  
  20. */
  21.  
  22. const PACKET_MAP = {
  23. // wont have all old packets, since they conflict with some of the new ones, add them yourself if you want to unpatch mods that are that old.
  24. "33": "9",
  25. // "7": "K",
  26. "ch": "6",
  27. "pp": "0",
  28. "13c": "c",
  29.  
  30. // most recent packet changes
  31. "f": "9",
  32. "a": "9",
  33. "d": "F",
  34. "G": "z"
  35. }
  36.  
  37. let originalSend = WebSocket.prototype.send;
  38.  
  39. WebSocket.prototype.send = new Proxy(originalSend, {
  40. apply: ((target, websocket, argsList) => {
  41. let decoded = msgpack.decode(new Uint8Array(argsList[0]));
  42.  
  43. if (PACKET_MAP.hasOwnProperty(decoded[0])) {
  44. decoded[0] = PACKET_MAP[decoded[0]];
  45. }
  46.  
  47. return target.apply(websocket, [msgpack.encode(decoded)]);
  48. })
  49. });

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址