Base 6 4 ta pu ni chi a ku n (lol)

Finds base64encoded and automatically decode

  1. // ==UserScript==
  2. // @name Base 6 4 ta pu ni chi a ku n (lol)
  3. // @namespace https://twitter.com/
  4. // @version 0.1
  5. // @description Finds base64encoded and automatically decode
  6. // @author 6 4 ta pu ni chi a ku n ro yal lol
  7. // @match https://twitter.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13. const root = document.getElementById("react-root");
  14.  
  15. setInterval(() => {
  16. const tweets = root.querySelectorAll("article div[dir][lang]:not(.base64-decoded)");
  17.  
  18. for (let tweet of tweets) {
  19. const text = tweet.textContent;
  20. const match = text.match(/[0-9A-Za-z+\/=]{8,}/);
  21. if (match && match[0].length * 2 > text.length) {
  22. let data = match[0];
  23. try { // repeat decoding
  24. for (;;) {
  25. data = atob(data);
  26. }
  27. } catch(e) {}
  28. if (/[\x80-\xff]/.test(data)) { // UTF-8
  29. data = new TextDecoder().decode(new Uint8Array(data.split("").map(c => c.charCodeAt())));
  30. }
  31. const decoded = document.createElement("div");
  32. decoded.style.color = "green";
  33. decoded.textContent = data;
  34. tweet.insertAdjacentElement("afterend", decoded);
  35. }
  36. tweet.classList.add("base64-decoded");
  37. // 6 4 た ぷ に き あ く ん 笑
  38. }
  39. }, 5000);
  40.  
  41. })();

QingJ © 2025

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