环境要求

node v12.16.3
npm 6.14.4

安装包

npm install acorn acorn-walk fs path escodegen

js代码


const acorn = require('acorn');
const walk = require('acorn-walk');
const escodegen = require('escodegen');
const fs = require('fs');
const path = require('path');

function S(e) {
    for (var t = '', n = e.charCodeAt(0), i = 1; i < e.length; ++i)
        t += String.fromCharCode(e.charCodeAt(i) ^ i + n & 127);
    return t;
}

function recursiveDecode(node) {
        if (node.type === 'Literal') {
        node.value = S(node.value);
        // console.log(node.value);
    } else if (node.type === 'ConditionalExpression') {
        recursiveDecode(node.consequent);
        recursiveDecode(node.alternate);
    } else {
        console.log('Node type is neither Literal nor ConditionalExpression. ' + node.start);
    }
}

// 这里改成你的代码位置
var inputFile = path.join(__dirname, 'ckfinder/ckfinder.min.js');
var outputFile = path.join(__dirname, 'ckfinder/ckfinder.js');

fs.readFile(inputFile, {encoding: 'utf-8'}, function (err, data) {
    if (err) {
        console.log(err);
        return;
    }
    var ast = acorn.parse(data);
    walk.simple(ast, {
        CallExpression: function (node) {
            if (node.callee.type === 'Identifier' && node.callee.name === 'S' && node.arguments.length === 1) {
                var arg0 = node.arguments[0];
                recursiveDecode(arg0);
                if (arg0.type === 'Literal') {
                } else if (arg0.type === 'ConditionalExpression') {
                    node.type = arg0.type;
                    node.test = arg0.test;
                    node.consequent = arg0.consequent;
                    node.alternate = arg0.alternate;
                }
            }
        }
    });
    var code = escodegen.generate(ast);
    fs.writeFile(outputFile, code, function (err) {
        if (err) {
            return console.log(err);
        }
        console.log('The file was saved!');
    });
});

下面是破解的关键地方大改是
只要通过把文本乱码的地方转移过来即可

然后把S函数的return t改为return e

    function S(e) {
        for (var t = '', n = e.charCodeAt(0), i = 1; i < e.length; ++i)
            t += String.fromCharCode(e.charCodeAt(i) ^ i + n & 127);
        return e;
    }

注意点

注意一般提示都调用 dialog:info
一般出现下面代码基本都是功能限制

验证判断

建议在上面代码 return true

去除页面提示

This is a demo version of CKFinder 3

This is a demo version of CKFinder 3

    function __internalInit(e) {
        return {
            "demoMessage": "",
            "hello": "https://ckeditor.com/docs/ckfinder/ckfinder3/#!/guide/dev_translations",
            "isDemo": false
        }
    }
//把上面的函数信息去掉

String.fromCharCode这块代码也是有提示的,这回是n函数。

    var n = function (e) {
        for (var t = '', n = 0; n < e.length; ++n)
            t += String.fromCharCode(e.charCodeAt(n) ^ n - 1 & 255);
        return t;
    };

下面建议直接改成true,是删除文件的提示。再有直接编辑器搜索'msg'

if (!(v && y && C && m) || w) {
    if (E)
        return;
    var n = function (e) {
        for (var t = '', n = 0; n < e.length; ++n)
            t += String.fromCharCode(e.charCodeAt(n) ^ n - 1 & 255);
        return t;
    };
    setTimeout(function () {
        t.setHandler('files:delete', function () {
            var e = {};
            e['msg'] = [
                '\xA6ot',
                '\x9Caollp',
                '\x9Bemgwa',
                '\x99imgp',
                '\x96n',
                '\xBBELM',
                '\x92oeg-'
            ]['map'](n)['join'](' '), t.request('dialog:info', e);
        });
    }, 100), E = !0;
}

去掉插件里面的提示信息

可以直接在i函数里面return "";


用PhpStorm系列软件 正则批量替换去除S函数
S\('([^']*)'\)
'$1'
增则替换

去除文件10个限制

              var n = o.request('files:getCurrent').where({ 'view:isFolder': !1 }).length, c = {};
                            c['msg'] = [
                                'F{q',
                                '|fywse',
                                '}u',
                                'tzxpe',
                                'bvf',
                                't|xqse',
                                'su`pd',
                                'f{q',
                                'gcxzws',
                                'qrz{yc',
                                'wkwpss',
                                '##',
                                '{}',
                                'vvyz',
                                '\x7F|pp8'
                            ]['map'](function (e) {
                                for (var t = '', n = 0; n < e.length; ++n)
                                    t += String.fromCharCode(e.charCodeAt(n) ^ n + 18 & 255);
                                console.log(t+"t");
                                return t;
                            })['join'](' '), n + s.length > '10' && o.request('dialog:info', c);
                            var d = -(n - '10');
                            d < 0 && (d = 0), s.splice(d, s.length);

删除定时的提示

                    if (!(v && C && m && y) || w) {
                                    if (F)
                                        return;
                                    var n = function (e) {
                                        for (var t = '', n = 0; n < e.length; ++n)
                                            t += String.fromCharCode(e.charCodeAt(n) ^ n + 7 & 255);
                                        return t;
                                    };
                                    window[S('setInterval')](function () {
                                        var e = {};
                                        e[S('msg')] = [
                                            S('S``y'),
                                            S('n{'),
                                            'f',
                                            S('cmde'),
                                            S('qm{ybcc'),
                                            S('hn'),
                                            S('DCOcehh|'),
                                            '4'
                                        ][S('map')](n)[S('join')](' '), t.request(S('dialog:info'), e);
                                    }, S('300000')), F = !0;
                                }
最后修改:2025 年 05 月 22 日
如果觉得我的文章对你有用,请随意赞赏