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

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

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

  1. // ==UserScript==
  2. // @name MooMoo.io Script Unpatcher (Any Hack) (All patches, fixes packets)
  3. // @namespace http://tampermonkey.net/
  4. // @version 100000
  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. "a": "9",
  32. "d": "F",
  33. "G": "z"
  34. }
  35.  
  36. let originalSend = WebSocket.prototype.send;
  37.  
  38. WebSocket.prototype.send = new Proxy(originalSend, {
  39. apply: ((target, websocket, argsList) => {
  40. let decoded = msgpack.decode(new Uint8Array(argsList[0]));
  41.  
  42. if (PACKET_MAP.hasOwnProperty(decoded[0])) {
  43. decoded[0] = PACKET_MAP[decoded[0]];
  44. }
  45.  
  46. return target.apply(websocket, [msgpack.encode(decoded)]);
  47. })
  48. });

QingJ © 2025

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