吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 1653|回复: 3
收起左侧

[求助] 一段js加密代码

[复制链接]
我去你们两个半 发表于 2021-10-12 17:53
25吾爱币
一段js加密代码,望JS大神提供解密思路

var __encode = 'jsjiami.com',
    _a = {},
    _0xb483 = ["_decode", "http://www.sojson.com/javascriptobfuscator.html"];
(function(_0xd642x1) {
    _0xd642x1[_0xb483[0]] = _0xb483[1]
})(_a);
var __Oxb7f82 = ["resize", "https://oss.cdblmkq.com", "width", "round", "css", "html", "click", ".jump-swt", "on", "body", "", "&cv=", "https://rgak7.kuaishang.cn/bs/im/78253/61107/836424.htm?dp=", "?", "split", "href", "location", "&cSourceTitle=", "title", "attr", "open", "#", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "random", "ease-out-back", "init", "test", "undefined", "now", "timeoutTimer", "intervalTimer", "name", "storage", "getTime", "assign", "expires", "stringify", "setItem", "value", "call", "toString", "prototype", "[object Object]", "[object Array]", "getItem", "parse", "startTime", "removeItem", "clear", "oncontextmenu", "document", "onkeydown", "onkeyup", "onkeypress", "event", "arguments", "caller", "callee", "keyCode", "code", "F12", "returnValue", "length", "debugger", "constructor", "log", "删除", "版本号,js会定", "期弹窗,", "还请支持我们的工作", "jsjia", "mi.com"];
$(window)[__Oxb7f82[0x0]](function() {
    htmlFontSize()
});
let oss = __Oxb7f82[0x1];

function htmlFontSize() {
    $(__Oxb7f82[0x5])[__Oxb7f82[0x4]]({
        'font-size': Math[__Oxb7f82[0x3]](($(window)[__Oxb7f82[0x2]]() / 2560) * 100000000) / 1000000
    })
}
$(__Oxb7f82[0x9])[__Oxb7f82[0x8]](__Oxb7f82[0x6], __Oxb7f82[0x7], function() {
    jumpSwt()
});

function jumpSwt(_0x3490x4 = __Oxb7f82[0xa]) {
    let _0x3490x5 = _0x3490x4 ? __Oxb7f82[0xb] + _0x3490x4 : __Oxb7f82[0xa];
    window[__Oxb7f82[0x14]](__Oxb7f82[0xc] + window[__Oxb7f82[0x10]][__Oxb7f82[0xf]][__Oxb7f82[0xe]](__Oxb7f82[0xd])[0x0] + __Oxb7f82[0x11] + $(document)[__Oxb7f82[0x13]](__Oxb7f82[0x12]) + _0x3490x5)
}
htmlFontSize();

function getColor() {
    var _0x3490x7 = __Oxb7f82[0x15];
    var _0x3490x8 = [__Oxb7f82[0x16], __Oxb7f82[0x17], __Oxb7f82[0x18], __Oxb7f82[0x19], __Oxb7f82[0x19], __Oxb7f82[0x1a], __Oxb7f82[0x1b], __Oxb7f82[0x1c], __Oxb7f82[0x1d], __Oxb7f82[0x1e], __Oxb7f82[0x1f], __Oxb7f82[0x20], __Oxb7f82[0x21], __Oxb7f82[0x22], __Oxb7f82[0x23], __Oxb7f82[0x24]];
    for (var _0x3490x9 = 0; _0x3490x9 < 6; _0x3490x9++) {
        var _0x3490xa = parseInt(Math[__Oxb7f82[0x25]]() * 16);
        _0x3490x7 += _0x3490x8[_0x3490xa]
    };
    return _0x3490x7
}

function aosInit() {
    AOS[__Oxb7f82[0x27]]({
        offset: 200,
        easing: __Oxb7f82[0x26],
        duration: 1500
    })
}

function isChinaName(_0x3490xd) {
    let _0x3490xe = /^[一-龥]{1,6}$/;
    return _0x3490xe[__Oxb7f82[0x28]](_0x3490xd)
}

function isCardNo(_0x3490x10) {
    let _0x3490xe = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
    return _0x3490xe[__Oxb7f82[0x28]](_0x3490x10)
}

function isPhoneNo(_0x3490x12) {
    let _0x3490xe = /^1[34578]\d{9}$/;
    return _0x3490xe[__Oxb7f82[0x28]](_0x3490x12)
}

function isChinese(_0x3490x14) {
    let _0x3490xe = /^[一-龥]+$/;
    return _0x3490xe[__Oxb7f82[0x28]](_0x3490x14)
}

function checkPassWord(_0x3490x16) {
    let _0x3490xe = /^[\w]{6,16}$/;
    return _0x3490xe[__Oxb7f82[0x28]](_0x3490x16)
}

function isEmpty(_0x3490x18) {
    if (typeof _0x3490x18 == __Oxb7f82[0x29] || _0x3490x18 == null || _0x3490x18 == __Oxb7f82[0xa]) {
        return true
    } else {
        return false
    }
}
const RAF = {
    intervalTimer: null,
    timeoutTimer: null,
    setTimeout: function(_0x3490x1a, _0x3490x1b) {
        let _0x3490x1c = Date[__Oxb7f82[0x2a]];
        let _0x3490x1d = _0x3490x1c();
        let _0x3490x1e = _0x3490x1d;
        let _0x3490x1f = () => {
            this[__Oxb7f82[0x2b]] = requestAnimationFrame(_0x3490x1f);
            _0x3490x1e = _0x3490x1c();
            if (_0x3490x1e - _0x3490x1d >= _0x3490x1b) {
                _0x3490x1a();
                cancelAnimationFrame(this[__Oxb7f82[0x2b]])
            }
        };
        this[__Oxb7f82[0x2b]] = requestAnimationFrame(_0x3490x1f);
        return this[__Oxb7f82[0x2b]]
    },
    clearTimeout: function() {
        cancelAnimationFrame(this[__Oxb7f82[0x2b]])
    },
    setInterval: function(_0x3490x1a, _0x3490x1b) {
        let _0x3490x1c = Date[__Oxb7f82[0x2a]];
        let _0x3490x1d = _0x3490x1c();
        let _0x3490x1e = _0x3490x1d;
        let _0x3490x1f = () => {
            this[__Oxb7f82[0x2c]] = requestAnimationFrame(_0x3490x1f);
            _0x3490x1e = _0x3490x1c();
            if (_0x3490x1e - _0x3490x1d >= _0x3490x1b) {
                _0x3490x1d = _0x3490x1c();
                _0x3490x1e = _0x3490x1d;
                _0x3490x1a()
            }
        };
        this[__Oxb7f82[0x2c]] = requestAnimationFrame(_0x3490x1f);
        return this[__Oxb7f82[0x2c]]
    },
    clearInterval: function() {
        cancelAnimationFrame(this[__Oxb7f82[0x2c]])
    }
};
class Storage {
    constructor(_0x3490xd) {
        this[__Oxb7f82[0x2d]] = __Oxb7f82[0x2e]
    }
    setItem(_0x3490x22) {
        let _0x3490x18 = {
            name: __Oxb7f82[0xa],
            value: __Oxb7f82[0xa],
            expires: __Oxb7f82[0xa],
            startTime: new Date()[__Oxb7f82[0x2f]]()
        };
        let _0x3490x23 = {};
        Object[__Oxb7f82[0x30]](_0x3490x23, _0x3490x18, _0x3490x22);
        if (_0x3490x23[__Oxb7f82[0x31]]) {
            localStorage[__Oxb7f82[0x33]](_0x3490x23[__Oxb7f82[0x2d]], JSON[__Oxb7f82[0x32]](_0x3490x23))
        } else {
            let _0x3490x24 = Object[__Oxb7f82[0x37]][__Oxb7f82[0x36]][__Oxb7f82[0x35]](_0x3490x23[__Oxb7f82[0x34]]);
            if (Object[__Oxb7f82[0x37]][__Oxb7f82[0x36]][__Oxb7f82[0x35]](_0x3490x23[__Oxb7f82[0x34]]) == __Oxb7f82[0x38]) {
                _0x3490x23[__Oxb7f82[0x34]] = JSON[__Oxb7f82[0x32]](_0x3490x23[__Oxb7f82[0x34]])
            };
            if (Object[__Oxb7f82[0x37]][__Oxb7f82[0x36]][__Oxb7f82[0x35]](_0x3490x23[__Oxb7f82[0x34]]) == __Oxb7f82[0x39]) {
                _0x3490x23[__Oxb7f82[0x34]] = JSON[__Oxb7f82[0x32]](_0x3490x23[__Oxb7f82[0x34]])
            };
            localStorage[__Oxb7f82[0x33]](_0x3490x23[__Oxb7f82[0x2d]], _0x3490x23[__Oxb7f82[0x34]])
        }
    }
    getItem(_0x3490xd) {
        let _0x3490x26 = localStorage[__Oxb7f82[0x3a]](_0x3490xd);
        if (!_0x3490x26) {
            return false
        };
        try {
            _0x3490x26 = JSON[__Oxb7f82[0x3b]](_0x3490x26)
        } catch (error) {
            _0x3490x26 = _0x3490x26
        };
        if (_0x3490x26[__Oxb7f82[0x3c]]) {
            let _0x3490x27 = new Date()[__Oxb7f82[0x2f]]();
            if (_0x3490x27 - _0x3490x26[__Oxb7f82[0x3c]] > _0x3490x26[__Oxb7f82[0x31]]) {
                localStorage[__Oxb7f82[0x3d]](_0x3490xd);
                return false
            } else {
                return _0x3490x26[__Oxb7f82[0x34]]
            }
        } else {
            return _0x3490x26
        }
    }
    removeItem(_0x3490xd) {
        localStorage[__Oxb7f82[0x3d]](_0x3490xd)
    }
    clear() {
        localStorage[__Oxb7f82[0x3e]]()
    }
};
window[__Oxb7f82[0x40]][__Oxb7f82[0x3f]] = function() {
    return false
};
document[__Oxb7f82[0x41]] = document[__Oxb7f82[0x42]] = document[__Oxb7f82[0x43]] = function(_0x3490x2a) {
    var _0x3490x2b = _0x3490x2a || window[__Oxb7f82[0x44]] || arguments[__Oxb7f82[0x47]][__Oxb7f82[0x46]][__Oxb7f82[0x45]][0x0];
    if (_0x3490x2b && (_0x3490x2b[__Oxb7f82[0x48]] === 123 || _0x3490x2b[__Oxb7f82[0x49]] === __Oxb7f82[0x4a])) {
        _0x3490x2b[__Oxb7f82[0x4b]] = false;
        return false
    }
};
setInterval(function() {
    check()
}, 4000);
let check = function() {
    function _0x3490x2d(_0x3490x2e) {
        if ((__Oxb7f82[0xa] + _0x3490x2e / _0x3490x2e)[__Oxb7f82[0x4c]] !== 1 || _0x3490x2e % 20 === 0) {
            (function() {}[__Oxb7f82[0x4e]](__Oxb7f82[0x4d])())
        } else {
            (function() {}[__Oxb7f82[0x4e]](__Oxb7f82[0x4d])())
        };
        _0x3490x2d(++_0x3490x2e)
    }
    try {
        _0x3490x2d(0)
    } catch (err) {}
};
check();;;
(function(_0x3490x2f, _0x3490x30, _0x3490x31, _0x3490x32, _0x3490x33, _0x3490x34) {
    _0x3490x34 = __Oxb7f82[0x29];
    _0x3490x32 = function(_0x3490x35) {
        if (typeof alert !== _0x3490x34) {
            alert(_0x3490x35)
        };
        if (typeof console !== _0x3490x34) {
            console[__Oxb7f82[0x4f]](_0x3490x35)
        }
    };
    _0x3490x31 = function(_0x3490x2e, _0x3490x2f) {
        return _0x3490x2e + _0x3490x2f
    };
    _0x3490x33 = _0x3490x31(__Oxb7f82[0x50], _0x3490x31(_0x3490x31(__Oxb7f82[0x51], __Oxb7f82[0x52]), __Oxb7f82[0x53]));
    try {
        _0x3490x2f = __encode;
        if (!(typeof _0x3490x2f !== _0x3490x34 && _0x3490x2f === _0x3490x31(__Oxb7f82[0x54], __Oxb7f82[0x55]))) {
            _0x3490x32(_0x3490x33)
        }
    } catch (e) {
        _0x3490x32(_0x3490x33)
    }
})({})

js.txt

8.69 KB, 下载次数: 1, 下载积分: 吾爱币 -1 CB

源文件

最佳答案

查看完整内容

不要用那些垃圾的通用的一键解密,正则表达式都被破坏了 思路放到控制台,设置个变量,把替换出去的补回来 假设代码变量为“code”, 运行最前面的初始化部分(开头到htmlFontSize函数定义之前的部分) 上面一小段代码即可输出替换回字符串的 ...

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

涛之雨 发表于 2021-10-12 17:53
不要用那些垃圾的通用的一键解密,正则表达式都被破坏了
思路放到控制台,设置个变量,把替换出去的补回来
假设代码变量为“code”,
运行最前面的初始化部分(开头到htmlFontSize函数定义之前的部分)
[JavaScript] 纯文本查看 复制代码
console.log(code.replace(/__Oxb7f82\[0x[\da-f]+\]/g,a=>{
a=`"${eval(a).replace(/"/g,"\"")}"`;
console.log(a);
return a
}))

上面一小段代码即可输出替换回字符串的代码到控制台

然后再手动删除一下垃圾代码

然后如果xxx["yyy"]这种看的不习惯就改成xxx.yyy
[JavaScript] 纯文本查看 复制代码
console.log(code.replace(/__Oxb7f82\[0x[\da-f]+\]/g,a=>{
a=`"${eval(a).replace(/"/g,"\"")}"`;
console.log(a);
return a
}).replace(/\[s*['"][^"']+['"]\s*\]/g,a=>{
a=a.trim();
a=a.substring(2,a.length-2)
console.log(a);
return "."+a
}))

然后再输出
[JavaScript] 纯文本查看 复制代码
$(window).resize(function() {
    htmlFontSize()
});
let oss = "https://oss.cdblmkq.com";

function htmlFontSize() {
    $("html").css({
        'font-size': Math.round(($(window).width() / 2560) * 100000000) / 1000000
    })
}
$("body").on("click", ".jump-swt", function() {
    jumpSwt()
});

function jumpSwt(_0x3490x4 = "") {
    let _0x3490x5 = _0x3490x4 ? "&cv=" + _0x3490x4 : "";
    window.open("https://rgak7.kuaishang.cn/bs/im/78253/61107/836424.htm?dp=" + window.location.href.split("?")[0x0] + "&cSourceTitle=" + $(document).attr("title") + _0x3490x5)
}
htmlFontSize();

function getColor() {
    var _0x3490x7 = "#";
    var _0x3490x8 = ["1", "2", "3", "4", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
    for (var _0x3490x9 = 0; _0x3490x9 < 6; _0x3490x9++) {
        var _0x3490xa = parseInt(Math.random() * 16);
        _0x3490x7 += _0x3490x8[_0x3490xa]
    };
    return _0x3490x7
}

function aosInit() {
    AOS.init({
        offset: 200,
        easing: "ease-out-back",
        duration: 1500
    })
}

function isChinaName(_0x3490xd) {
    let _0x3490xe = /^[\u4E00-\u9FA5]{1,6}$/;
    return _0x3490xe.test(_0x3490xd)
}

function isCardNo(_0x3490x10) {
    let _0x3490xe = /(^d{15}$)|(^d{18}$)|(^d{17}(d|X|x)$)/;
    return _0x3490xe.test(_0x3490x10)
}

function isPhoneNo(_0x3490x12) {
    let _0x3490xe = /^1[34578]d{9}$/;
    return _0x3490xe.test(_0x3490x12)
}

function isChinese(_0x3490x14) {
    let _0x3490xe = /^[\u4E00-\u9FA5]+$/;
    return _0x3490xe.test(_0x3490x14)
}

function checkPassWord(_0x3490x16) {
    let _0x3490xe = /^[w]{6,16}$/;
    return _0x3490xe.test(_0x3490x16)
}

function isEmpty(_0x3490x18) {
    if (typeof _0x3490x18 == "undefined" || _0x3490x18 == null || _0x3490x18 == "") {
        return true
    } else {
        return false
    }
}
const RAF = {
    intervalTimer: null,
    timeoutTimer: null,
    setTimeout: function(_0x3490x1a, _0x3490x1b) {
        let _0x3490x1c = Date.now;
        let _0x3490x1d = _0x3490x1c();
        let _0x3490x1e = _0x3490x1d;
        let _0x3490x1f = () => {
            this.timeoutTimer = requestAnimationFrame(_0x3490x1f);
            _0x3490x1e = _0x3490x1c();
            if (_0x3490x1e - _0x3490x1d >= _0x3490x1b) {
                _0x3490x1a();
                cancelAnimationFrame(this.timeoutTimer)
            }
        };
        this.timeoutTimer = requestAnimationFrame(_0x3490x1f);
        return this.timeoutTimer
    },
    clearTimeout: function() { cancelAnimationFrame(this.timeoutTimer) },
    setInterval: function(_0x3490x1a, _0x3490x1b) {
        let _0x3490x1c = Date.now;
        let _0x3490x1d = _0x3490x1c();
        let _0x3490x1e = _0x3490x1d;
        let _0x3490x1f = () => {
            this.intervalTimer = requestAnimationFrame(_0x3490x1f);
            _0x3490x1e = _0x3490x1c();
            if (_0x3490x1e - _0x3490x1d >= _0x3490x1b) {
                _0x3490x1d = _0x3490x1c();
                _0x3490x1e = _0x3490x1d;
                _0x3490x1a()
            }
        };
        this.intervalTimer = requestAnimationFrame(_0x3490x1f);
        return this.intervalTimer
    },
    clearInterval: function() { cancelAnimationFrame(this.intervalTimer) }
};
class Storage {
    constructor(_0x3490xd) {
        this.name = "storage"
    }
    setItem(_0x3490x22) {
        let _0x3490x18 = {
            name: "",
            value: "",
            expires: "",
            startTime: new Date().getTime()
        };
        let _0x3490x23 = {};
        Object.assign(_0x3490x23, _0x3490x18, _0x3490x22);
        if (_0x3490x23.expires) {
            localStorage.setItem(_0x3490x23.name, JSON.stringify(_0x3490x23))
        } else {
            let _0x3490x24 = Object.prototype.toString.call(_0x3490x23.value);
            if (Object.prototype.toString.call(_0x3490x23.value) == "[object Object]") {
                _0x3490x23.value = JSON.stringify(_0x3490x23.value)
            };
            if (Object.prototype.toString.call(_0x3490x23.value) == "[object Array]") {
                _0x3490x23.value = JSON.stringify(_0x3490x23.value)
            };
            localStorage.setItem(_0x3490x23.name, _0x3490x23.value)
        }
    }
    getItem(_0x3490xd) {
        let _0x3490x26 = localStorage.getItem(_0x3490xd);
        if (!_0x3490x26) {
            return false
        };
        try {
            _0x3490x26 = JSON.parse(_0x3490x26)
        } catch (error) {
            _0x3490x26 = _0x3490x26
        };
        if (_0x3490x26.startTime) {
            let _0x3490x27 = new Date().getTime();
            if (_0x3490x27 - _0x3490x26.startTime > _0x3490x26.expires) {
                localStorage.removeItem(_0x3490xd);
                return false
            } else {
                return _0x3490x26.value
            }
        } else {
            return _0x3490x26
        }
    }
    removeItem(_0x3490xd) {
        localStorage.removeItem(_0x3490xd)
    }
    clear() {
        localStorage.clear()
    }
};
window.document.oncontextmenu = function() {
    return false
};
document.onkeydown = document.onkeyup = document.onkeypress = function(_0x3490x2a) {
    var _0x3490x2b = _0x3490x2a || window.event || arguments.callee.caller.arguments[0x0];
    if (_0x3490x2b && (_0x3490x2b.keyCode === 123 || _0x3490x2b.code === "F12")) {
        _0x3490x2b.returnValue = false;
        return false
    }
};

免费评分

参与人数 4吾爱币 +4 热心值 +2 收起 理由
CXM~ + 1 用心讨论,共获提升!
怜渠客 + 1 热心回复!
独行剑侠 + 1 + 1 用心讨论,共获提升!
我去你们两个半 + 1 + 1 谢谢@Thanks!

查看全部评分

ly765893958 发表于 2021-10-13 11:59
排面啊老哥,版主给你回复,赶紧把你的CB交出来吧,论坛要回收。
独行剑侠 发表于 2021-10-26 21:09
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止回复与主题无关非技术内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-5-29 14:13

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表