E-Code

Evades Coder

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.gf.qytechs.cn/scripts/438621/1022930/E-Code.js

  1. // ==UserScript==
  2. // @license MIT
  3. // @name E-Code
  4. // @version 1.1
  5. // @description Evades Coder
  6. // @author 0vC4
  7. // @match http://*/*
  8. // @match https://*/*
  9. // @grant none
  10. // @run-at document-start
  11. // @namespace https://gf.qytechs.cn/users/670183
  12. // ==/UserScript==
  13.  
  14. const Coder = await (async () => {
  15. const getFile = async url => await fetch(url).then(d=>d.text());
  16. const use = code => new Function('return '+code)();
  17.  
  18. eval(await getFile('https://cdn.jsdelivr.net/gh/dcodeIO/protobuf.js@6.11.2/dist/light/protobuf.min.js'));
  19. const appUrl = await getFile(location.href).then(d=>d.match(/app\.[a-z0-9]*\.js/)[0]);
  20. const mainJS = await getFile(location.href+'/'+appUrl);
  21. const scheme = use(mainJS.match(/(?<=\.addJSON\()\{(.|\n)+?\}(?=\);)/)[0]);
  22.  
  23. const coder = new protobuf.Root();
  24. coder.addJSON(scheme);
  25.  
  26. return {
  27. protobuf: coder,
  28. decode: {
  29. server(packet) {
  30. return coder.FramePayload.toObject(coder.FramePayload.decode(new Uint8Array(packet)));
  31. },
  32. client(packet) {
  33. return coder.ClientPayload.toObject(coder.ClientPayload.decode(new Uint8Array(packet)));
  34. }
  35. },
  36. encode: {
  37. server(object) {
  38. return coder.FramePayload.encode(object).finish();
  39. },
  40. client(object) {
  41. return coder.ClientPayload.encode(object).finish();
  42. }
  43. }
  44. };
  45. })();

QingJ © 2025

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