arca live 심야식당 자동복호화

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

目前為 2025-05-21 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         arca live 심야식당 자동복호화
// @namespace    http://tampermonkey.net/
// @version      0.230
// @description  심야식당내 base64코드 자동복호화
// @author       SYJ
// @match        https://arca.live/*
// @match https://kone.gg/s/somisoft*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=arca.live
// @grant        none
// @license MIT
// ==/UserScript==

function main(){
    setTimeout(doDecode, 400);
    setTimeout(doDecode, 1000);
}
function doDecode() {
    ///'use strict';
    const article = document.querySelector("body");

    function dec(reg)
    {
        try
        {
            while (reg.test(article.innerHTML))
            {
                let decoded = reg.exec(article.innerHTML)[0];
                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(reg, `<a href=${decoded} target='_blank' rel='noreferrer'>${decoded}</a>`);
            }
        }
        catch(e)
        {
            console.log(e,article);
        }
    }
    dec(/aHR0c[0-9A-Za-z+]{20,}[=]{0,2}/); //aHR0c:1회인코딩된것.
    dec(/YUhSMGN[0-9A-Za-z]{80,}[=]{0,2}/); //YUhSMGN:2회인코딩된것.
    dec(/[0-9A-Za-z]{30,}[=]{1,2}/); //문자열 30회 + '=' 1~2회
    dec(/[0-9A-Za-z]{200,}[=]{0,2}/); //문자열 200회 + '=' 0~2회
}

window.addEventListener('load', main);