심야식당 자동복호화3

심야식당내 base64코드 자동복호화

目前為 2022-03-19 提交的版本,檢視 最新版本

// ==UserScript==
// @name         심야식당 자동복호화3
// @namespace    http://tampermonkey.net/
// @version      0.215
// @description  심야식당내 base64코드 자동복호화
// @author       SYJ
// @match        https://arca.live/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=arca.live
// @grant        none
// @require http://code.jquery.com/jquery-3.6.0.min.js
// @license MIT
// ==/UserScript==

(function() {
    //'use strict';
    let article=$('.article-content')[0];
    let regexp = /[0-9A-Za-z]{30,}[=]{1,2}/;
    let code = regexp.exec(article.innerHTML)[0]; console.log(code);
    let decoded = code;

    while (decoded != null)
    {
        while (decoded.match(/aHR0c[0-9A-Za-z]{8,}[=]{0,2}/) == null)
            decoded = atob(decoded);

        decoded = atob(decoded); console.log(decoded);
        article.innerHTML = article.innerHTML.replace(regexp,"<a href='" + decoded + "'>" + decoded + "</a>");

        decoded = regexp.exec(article.innerHTML)[0]; console.log(code);
    }

})();