破解反爬虫策略 /_guard/auto.js(二)实战

这次我们用上篇文章讲到的方法来真正破解一下反爬虫策略,这两个案例是两个不同的网站,一个用的是 /_guard/auto.js,另一个用的是/_guard/delay_jump.js。经过解析发现这两个网站用的反爬虫策略基本是一模一样,只不过在js混淆和生成guardret的算法上有很细微的差别,由此看来,以后请求其他网站,如果也是这种不返回正确的数据而是返回了一个js,那么也可以直接套用下面的代码做一些细微的调整即可。

案例一

js内容

var _0xod4 = 'v1';
var _0x15af65 = _0x2155;
(function (_0x2e67e3, comparisonValue, stringArrayFunctionName, rightNum, checkVersion, shift, _0x465098) {
    return _0x2e67e3 = _0x2e67e3 >> 0x1, shift = 'hs', _0x465098 = 'hs', function (stringArrayFunction, comparisonValue, _0x27a225, temp, _0x3316f1) {
        var _0x160215 = _0x2155;
        temp = 'tfi', shift = temp + shift, _0x3316f1 = 'up', _0x465098 += _0x3316f1, shift = _0x27a225(shift), _0x465098 = _0x27a225(_0x465098), _0x27a225 = 0x0;
        var stringArray = stringArrayFunction();
        while (!![] && --rightNum + comparisonValue) {
            try {
                temp = -parseInt(_0x160215(0x16c, '88G9')) / 0x1 + parseInt(_0x160215(0x14b, '4qz]')) / 0x2 + parseInt(_0x160215(0x133, '(9CA')) / 0x3 + -parseInt(_0x160215(0x196, 'qGDC')) / 0x4 + -parseInt(_0x160215(0x112, '2IOp')) / 0x5 + -parseInt(_0x160215(0x145, 'Uvtk')) / 0x6 * (-parseInt(_0x160215(0x13e, '(*tt')) / 0x7) + parseInt(_0x160215(0x116, '%mpD')) / 0x8 * (parseInt(_0x160215(0x176, '[gv0')) / 0x9);
            } catch (_0x2280d7) {
                temp = _0x27a225;
            } finally {
                _0x3316f1 = stringArray[shift]();
                if (_0x2e67e3 <= rightNum) _0x27a225 ? checkVersion ? temp = _0x3316f1 : checkVersion = _0x3316f1 : _0x27a225 = _0x3316f1; else {
                    if (_0x27a225 == checkVersion['replace'](/[gVLixNQYGUptydrelmb=]/g, '')) {
                        if (temp === comparisonValue) {
                            stringArray['un' + shift](_0x3316f1);
                            break;
                        }
                        stringArray[_0x465098](_0x3316f1);
                    }
                }
            }
        }
    }(stringArrayFunctionName, comparisonValue, function (_0x1980fb, _0x2f3155, c, _0x16e044, _0x44a646, _0x277563, _0x3364d6) {
        return _0x2f3155 = '\x73\x70\x6c\x69\x74', _0x1980fb = arguments[0x0], _0x1980fb = _0x1980fb[_0x2f3155](''), c = '\x72\x65\x76\x65\x72\x73\x65', _0x1980fb = _0x1980fb[c]('\x76'), _0x16e044 = '\x6a\x6f\x69\x6e', (0x161525, _0x1980fb[_0x16e044](''));
    });
}(0x17a, 0xaa70c, _0x582a, 0xbf), _0x582a) && (_0xod4 = 0xbf);
var oooo = 0xf23d4, ooe;

function _0x582a() {
    var _0x28bbb2 = (function () {
        return [_0xod4, 'ULgvmpG1dQYbexNlGitVelexLlry==', 'nCk8oCkxdG', 'dCoeySof', 'W5NcP8oXW6BcHW', 'vCkeq8kLWO0', 'W4ZdHmo2WPSpWRNcLmkMaYewfa', 'FSkBp8oWW5W', 'mSobmY7cJW', 'W7dcGSohW6hcUq'].concat((function () {
            return ['W4tcPmowWOK', 'W5VcK8omW4NcTq', 'd8obBmonxW', 'mWDdWPlcSsKNk10', 'oCo1tSkfCCkdywq1gqJdPa', 'DCoFgSoEW5K', 'emkjo8kRiq', 'W4BcJ8oYWOro', 'lmoWuSkKWPq', 'qSorrNtcVCoDjmkFW7vUxrm'].concat((function () {
                return ['WROQW67cK30', 'W7/cT8oYWOqx', 'iZy/wSoeoW', 'v8ojiCoqW70', 'W5hcUCoNW6u', 'n8oAA8osxG', 'gSkJamkLW5y', 'W7xcLmobWQuJ', 'sSkmtCkp', 'CZ7dMru'].concat((function () {
                    return ['rayg', 'ymoOWOFdK8oNWOfhW4hdSW', 'W4ZcSmoNWP4X', 'WRNcJGRcH1m', 'Dmo1WQNdSSki', 'qvVdNqe1', 'WR9hWOGdBa', 'vmkvbmorWPO', 's8khjmo5W55EedS', 'W48pW5iiW78'].concat((function () {
                        return ['v8oHemoYW4m', 'p8k+omkFW4u', 'WOagW5FcJxJdUG', 'bbBdOsNcPq', 'kt4nWRGvd20GWQG', 'gcmzWQmK', 'gSkjnHVdPW', 'Amo8aem', 'C8o4heRdMCoq', 'h8k+mq'].concat((function () {
                            return ['d8otB8khamkfm1maqW', 'lcicWQ4', 'W4PvWO3dKcVcPSoDlSozjI/dMW', 'fmoBWPzXWOi', 'e8o4W5tcLCkj', 'jCowW6HQjq', 'wZ3cGIBdGa', 'W5VcNCksWRXE', 'n8oZBSkFyq', 'W4dcS8oDWOH2W7K'].concat((function () {
                                return ['aSoFASojzgRcM8k0WRZcVmoVWPHXw0mx', 'xCoBFSk0Eq', 'b8oxtCkiW5PrEd4pW6bxW4qB', 'umkJjmoVW4W', 'cSo7W6ne', 'W43cLSkYWPPd', 'W5BcPSoBWOTP', 'bCocq8keqa', 'lImHuCoj', 'aSo4DehcVSolW7LTWQ8BW4dcSW'].concat((function () {
                                    return ['m8oIDSkczq', 'v8kCmSohsutcRCk5W6K', 'WOa8WRpcTSkj', 'qmocaL/dGSomW4ddLCoW', 'm8oZuCkpWOC', 'W7xcVSkgWPz/', 'WQZcRCocpCkn', 'dSk3huNcGCogzeywW5lcJxy', 'W44QW6yKW4e', 'kmohkapcN8odiSkU'].concat((function () {
                                        return ['A8oKW4BdJ8oH', 'WOtcRSkNW6zW', 'hmkQivdcSmohA1m', 'fmoyF8kXWPW', 'fchdGYpcIa', 'jJKjWQW', 'WPb8WQaeua', 'pSoSW5/cRavFWO54WPqwrJW', 'z0quWO3cJa', 'WQxcL8o0imkhibO'].concat((function () {
                                            return ['dCoeDmoFza', 'W7pdGCkSdMq', 'uI3cMJ7dHa', 'W5FcR8o2WPOw', 'iMdcGuJdLSotW5esW4L2WPXlCW', 'bSoOE8k7sW', 'f8kpedhdQSkdlW', 'wSkjdmovWOa', 'sWypW7KtW7HOWQVdRb43', 'rSobWPVdT8knbchcSwpcRuu'].concat((function () {
                                                return ['ady9gCkR', 'FgDLdSkazrxdUCkQW6LXo3C', 'o8k1e8k2pW', 'WONcM8kvW5LoW6lcOmkn', 'nCocWR91WP8', 'W4/cVSosWP1bW77dUmoPW5lcGG', 'hauWFSog', 'w8oAW6xdJCoT', 'vqxcNrBdSG', 'W7ZcRConWReB'].concat((function () {
                                                    return ['W5mNW6yoW5/cJIrw', 'a8ouW77cLSkn', 'W7X7WRiRutBdPL7dGa', 'xmoxjfJdMG', 'W6P6WRG9qY3dVvJdKgar', 'W6D8WP4xvq', 'hSkpkGxdIq', 'cmoBy8k9WRm', 'W4qLFSk3nCkAW5FdI8oLWPyBW4HwWOlcGdpcSZpcKCk8B8oUa8kWF8kyWPldOCkIy2rLnYO', 'x8olW7VdIG'].concat((function () {
                                                        return ['WRJcOY7cLuK', 'A8o4avK', 'W6pcSCkMWP1x', 'WPvVWQqjx8kP', 'WPrdWPD/aa', 'vSolWOddLCkkfq', 'W4/cM8o8WPzx', 'FCoHWQ3dHmkT', 'W7TMq8oUvSoFWPVcKCkEWRK', 'W4BcO8kcWRjc'].concat((function () {
                                                            return ['W718umoZzW', 'WQOfW7BcIfi', 'W4X/WPxdIv4', 'ASopBCkWv0/dTmk/W44', 'WRmYW73cRNi', 'W63dR8kufKu', 'h8k5iSk9bt4NWP/dOSot', 'W5VcSSoXWR0NWORdMCkX', 'xmofW5RdKmoRWPNdVSkb', 'W544W7udW5i'].concat((function () {
                                                                return ['BmorzCk8rq', 'lmoAfapcGSoEnCk5WQy', 'BmovE8k8x0e', 'wmorWONdImoX', 'rCkkba', 't8ofWPJdLCoNWOfrW67dIq', 'W5/cPSoFWOz2', 'W5WJW4m5W54', 'W4r/WO4kvq', 'kmopCSo9wq'].concat((function () {
                                                                    return ['WO16WRvFWP3dNN50pq8HWQnp', 'gIWVhCkx', 'wuldIaia', 'W4jhqCoWyW', 'i8kUW5ZcLmk4W4mlW5JdSx/dK8oclW', 'W7ldKmkshL4', 'W5DAWOZdOI0', 'yY/dNXNcRq', 'umkAtCoIvvNcP8ka', 'W5XNWPZdMLu'].concat((function () {
                                                                        return ['lH8+zCo8', 'pHBdVctcMa', 'gJestmoc', 'jr3dMY/cQa', 'WOa5WPFcLSkW', 'ah7dU2JcPtGMW7KMW7ahWP5J', 'pCo6iJJcVW', 'W43cOCosW6BcRa', 'W5T4WQhdR3G', 'W4S6W6qmW44'].concat((function () {
                                                                            return ['g8oLxCk6qq', 'W6XTWRuRrYVdOvtdIG', 'z8kcdSoqWRm', 'c8oiBSopC3C', 'WOreWPfYhxC', 'W4VcSmkrWQ9W', 'b8kvhdhdSCkD', 'qCoHmCoqW7e', 'qCkwsCkBWPJdVCoSW6ZdMmou', 'WP0jWQtcKmkbWQFcTHRcLa'].concat((function () {
                                                                                return ['h8kKpmkUW74', 'emk+imkUmJGSWPq', 'WO1fWPOdFq', 'WPD3WQabrq', 'pmkRkaxdJW', 'omkHW5tdPGWrW5jgW6GVea', 'Bx/dSG4', 'W4/dI2ZdJs/cJfWaW7epd8kbAq', 'FrmpW6yV', 'qCkxjmo9W55F'].concat((function () {
                                                                                    return ['pSobfrm', 'cCoEaqpcPa', 'd8oQtmkzwq', 'Bf0BWPBcMW'];
                                                                                }()));
                                                                            }()));
                                                                        }()));
                                                                    }()));
                                                                }()));
                                                            }()));
                                                        }()));
                                                    }()));
                                                }()));
                                            }()));
                                        }()));
                                    }()));
                                }()));
                            }()));
                        }()));
                    }()));
                }()));
            }()));
        }()));
    }());
    _0x582a = function () {
        return _0x28bbb2;
    };
    return _0x582a();
};(function () {
    var _0x347e96 = _0x2155, OtvxHQ = {
            'LRvAS': 'undefined', 'adWoW': function (_0x1345e8, _0x25be49) {
                return _0x1345e8 === _0x25be49;
            }, 'olxhc': 'object', 'XfMjK': _0x347e96(0x15e, 'c]oM'), 'kvVRH': function (_0x3fe49b, _0x51352a) {
                return _0x3fe49b === _0x51352a;
            }
        },
        that = typeof window !== OtvxHQ['LRvAS'] ? window : OtvxHQ[_0x347e96(0x194, 'Q^Rn')](typeof process, OtvxHQ[_0x347e96(0x199, '[gv0')]) && typeof require === OtvxHQ[_0x347e96(0x1bb, '88G9')] && OtvxHQ[_0x347e96(0x193, 'j$AR')](typeof global, _0x347e96(0x125, '%mpD')) ? global : this;
    that[_0x347e96(0x19b, '[Fz[')](_0x456a4f, 0x7d0);
}());
if (oooo = oooo >> 0xc ^ 0xd5, ooe = window[_0x15af65(0x1a6, 'vTuG')] && window['navigator'][_0x15af65(0x12b, '9^H]')]) {
    var i = 0x9;
    for (oooo = oooo ^ i; i < oooo | 0x9; i > 0x0) {
        ooe[_0x15af65(0x18d, 'mAYl')] = ooe[_0x15af65(0x154, 'WTpP')] + '?' + i;
    }
    ;
}
;

function a(input) {
    var _0x5f42ad = _0x15af65, _0x314d67 = {
        'HKaoy': function (callee, _0x2af9d4) {
            return callee(_0x2af9d4);
        }
    };
    return _0x314d67[_0x5f42ad(0x1c7, '2IOp')](atob, input);
}

function b(input) {
    var _0x1df6a9 = _0x15af65, _0x2056fd = {
        'HKVGJ': function (callee, _0x55533f) {
            return callee(_0x55533f);
        }
    };
    return _0x2056fd[_0x1df6a9(0x130, '4qz]')](btoa, input);
}

function x(input, _0x56ee7b) {
    var _0x4d7909 = _0x15af65, _0x453109 = {
        'kkhgO': function (_0xa38b79, _0x106f39) {
            return _0xa38b79 + _0x106f39;
        }, 'ENirv': function (_0x2f779a, _0x416b4b) {
            return _0x2f779a !== _0x416b4b;
        }, 'OuMHF': _0x4d7909(0x151, '%mpD'), 'ocuSY': function (_0x44bb0a, _0x227faa) {
            return _0x44bb0a ^ _0x227faa;
        }
    };
    let output = '';
    var _0x56ee7b = _0x453109[_0x4d7909(0x144, '%mpD')](_0x56ee7b, 'PTNo2n3Ev5');
    for (let _0x4e905d = 0x0; _0x4e905d < input['length']; _0x4e905d++) {
        if (_0x453109[_0x4d7909(0x1a7, 'L2qu')](_0x453109[_0x4d7909(0x1b2, 'dXSU')], _0x4d7909(0x1a5, 'bDNu'))) _0x98e486 = 0x2; else {
            const charCode = _0x453109[_0x4d7909(0x10f, 'tDlO')](input[_0x4d7909(0x12a, 'WTpP')](_0x4e905d), _0x56ee7b[_0x4d7909(0x1b8, 'C8Y8')](_0x4e905d % _0x56ee7b['length']));
            output += String[_0x4d7909(0x146, 'x3Jd')](charCode);
        }
    }
    return output;
}

function getCookie(_0x3b7f01) {
    var _0x364780 = _0x15af65, _0x3beb3d = {
        'KFdkZ': function (_0x2180e3, _0x1a4794) {
            return _0x2180e3 + _0x1a4794;
        },
        'YqPjx': function (_0x2636a6, _0x556bbf) {
            return _0x2636a6 / _0x556bbf;
        },
        'CNOkx': 'length',
        'ZIclv': function (_0x2f182f, _0x56ed22) {
            return _0x2f182f === _0x56ed22;
        },
        'OONhB': function (_0x5beff8, _0x1299db) {
            return _0x5beff8 % _0x1299db;
        },
        'AwkWR': _0x364780(0x118, 'KYIJ'),
        'jYAkL': _0x364780(0x1cb, 'vTuG'),
        'VQaRh': _0x364780(0x14d, 'bDNu'),
        'NMAkx': 'vjIlM',
        'fLPGa': function (_0x2e0f5e, _0x38e106) {
            return _0x2e0f5e !== _0x38e106;
        },
        'UvztI': 'RwimX',
        'AQFLk': _0x364780(0x1a8, '6pp^'),
        'HbuOQ': _0x364780(0x1b3, 'N@4a'),
        'jghBr': 'function',
        'LevWI': _0x364780(0x1ba, 'C8Y8'),
        'MDeJg': _0x364780(0x123, '6pp^'),
        'Pmmqk': _0x364780(0x121, 'vTuG'),
        'pGWgT': function (_0x42ad32, _0x5e853a) {
            return _0x42ad32 < _0x5e853a;
        },
        'ImzXH': 'fmhyk',
        'YzmCn': _0x364780(0x1ae, 'C8Y8'),
        'Siujv': function (callee, _0x5ed63e) {
            return callee(_0x5ed63e);
        },
        'niHYb': function (_0x559093, _0x31986b) {
            return _0x559093 + _0x31986b;
        },
        'cHoBO': _0x364780(0x161, '0uvs'),
        'EdjQY': function (_0x2eeaa9, _0x357945) {
            return _0x2eeaa9 === _0x357945;
        },
        'BzwaH': _0x364780(0x1b6, 'Tp6i'),
        'uasJp': function (callee, _0x17e6e3, _0x2e237a) {
            return callee(_0x17e6e3, _0x2e237a);
        },
        'ewLbp': _0x364780(0x16a, 'x3Jd'),
        'pJXZY': function (_0x4177e6, _0x535674) {
            return _0x4177e6 % _0x535674;
        },
        'jqnhl': 'AchTl',
        'lXxdg': function (_0x227829, _0x3d5e25) {
            return _0x227829 === _0x3d5e25;
        },
        'msqjZ': _0x364780(0x1a2, 'KYIJ'),
        'uXnJi': function (callee, _0x4f23d9) {
            return callee(_0x4f23d9);
        },
        'XfSjO': _0x364780(0x186, 'vTuG'),
        'HEBzN': function (_0x2e7163, _0x372a75) {
            return _0x2e7163 === _0x372a75;
        },
        'cmEWd': _0x364780(0x150, '!MEF'),
        'tdCPw': _0x364780(0x177, 'QGJv'),
        'dDgnK': _0x364780(0x131, 'I^i0'),
        'gtzza': function (callee) {
            return callee();
        },
        'uvSlR': function (_0x3f7747, _0x358f25) {
            return _0x3f7747 == _0x358f25;
        }
    }, _0x2d8df0 = (function () {
        var _0x430740 = _0x364780;
        if (_0x3beb3d['fLPGa'](_0x3beb3d[_0x430740(0x137, '&H0m')], _0x3beb3d['UvztI'])) {
            if (BeBXaA['KFdkZ']('', BeBXaA[_0x430740(0x119, 'jC3%')](counter, counter))[BeBXaA[_0x430740(0x188, 'n5M^')]] !== 0x1 || BeBXaA['ZIclv'](BeBXaA[_0x430740(0x197, 'E&UR')](counter, 0x14), 0x0)) debugger; else debugger;
        } else {
            var firstCall = !![];
            return function (context, _0x2b530e) {
                var _0x4d5edd = _0x430740, _0x10f5e3 = {
                    'uioiU': function (callee, _0x252f8d) {
                        return callee(_0x252f8d);
                    },
                    'PAFGQ': function (_0x449472, _0x85930d) {
                        return _0x449472 !== _0x85930d;
                    },
                    'RBhiH': _0x3beb3d['AwkWR'],
                    'CUqKa': _0x3beb3d[_0x4d5edd(0x149, 'Tp6i')],
                    'uygWe': _0x3beb3d[_0x4d5edd(0x1a0, 'u4t3')],
                    'wHToA': _0x3beb3d[_0x4d5edd(0x15b, '2bO3')]
                }, _0x3a3092 = firstCall ? function () {
                    var _0x5e0003 = _0x4d5edd;
                    if (_0x10f5e3['PAFGQ'](_0x10f5e3[_0x5e0003(0x122, 'E&UR')], _0x10f5e3['CUqKa'])) {
                        if (_0x2b530e) {
                            if (_0x10f5e3[_0x5e0003(0x19c, 'tDlO')] === _0x10f5e3[_0x5e0003(0x12e, 'N@4a')]) return debuggerProtection; else {
                                var _0x3f64a4 = _0x2b530e[_0x5e0003(0x1c3, 'vTuG')](context, arguments);
                                return _0x2b530e = null, _0x3f64a4;
                            }
                        }
                    } else return _0x10f5e3['uioiU'](atob, input);
                } : function () {
                };
                return firstCall = ![], _0x3a3092;
            };
        }
    }());
    (function () {
        var _0x526d8b = _0x364780, EtqxRI = {
            'CJVuw': function (_0x3b8fa6, _0x542732) {
                var _0x328051 = _0x2155;
                return _0x3beb3d[_0x328051(0x1a4, 'Q^Rn')](_0x3b8fa6, _0x542732);
            },
            'jPuBz': _0x3beb3d[_0x526d8b(0x15a, '[Fz[')],
            'wzkLV': function (_0x35d245, _0x5a09e9) {
                var _0x42ba02 = _0x526d8b;
                return _0x3beb3d[_0x42ba02(0x153, 'bDNu')](_0x35d245, _0x5a09e9);
            },
            'UbCqr': _0x3beb3d[_0x526d8b(0x14a, 'E6p8')],
            'jgigS': function (_0x598f2b, _0x6d5198) {
                return _0x598f2b === _0x6d5198;
            },
            'etzTJ': _0x3beb3d[_0x526d8b(0x113, 'j$AR')],
            'sMSvn': _0x3beb3d[_0x526d8b(0x10d, '%mpD')],
            'gThCO': _0x3beb3d['MDeJg'],
            'yZaKL': _0x3beb3d[_0x526d8b(0x138, 'x3Jd')],
            'bkGag': function (_0x47bf95, _0x50aa72) {
                var _0x5344bb = _0x526d8b;
                return _0x3beb3d[_0x5344bb(0x15f, 'vTuG')](_0x47bf95, _0x50aa72);
            },
            'wHHVu': '4|2|0|5|3|1',
            'cDMCK': function (_0x3688d9, _0x49faf6) {
                var _0x3db0e7 = _0x526d8b;
                return _0x3beb3d[_0x3db0e7(0x111, 'C8Y8')](_0x3688d9, _0x49faf6);
            },
            'htOwS': _0x3beb3d[_0x526d8b(0x13a, '$l]E')],
            'joTGL': _0x3beb3d[_0x526d8b(0x183, 'dXSU')],
            'ulsGA': function (callee, _0x60a759) {
                var _0x56f17d = _0x526d8b;
                return _0x3beb3d[_0x56f17d(0x13f, 'c]oM')](callee, _0x60a759);
            },
            'zXYFU': 'init',
            'sFomh': function (_0x24b61e, _0x1f1403) {
                var _0x417254 = _0x526d8b;
                return _0x3beb3d[_0x417254(0x140, '&H0m')](_0x24b61e, _0x1f1403);
            },
            'dQBdl': 'chain',
            'EJFoP': _0x526d8b(0x184, '$8l3'),
            'WavdB': _0x3beb3d['cHoBO'],
            'ITsBz': function (callee) {
                return callee();
            }
        };
        if (_0x3beb3d['EdjQY'](_0x3beb3d[_0x526d8b(0x11b, 'jC3%')], _0x3beb3d[_0x526d8b(0x175, ')LSI')])) _0x3beb3d['uasJp'](_0x2d8df0, this, function () {
            var _0x568a75 = _0x526d8b;
            if (EtqxRI[_0x568a75(0x143, '!MEF')](EtqxRI[_0x568a75(0x172, 'x3Jd')], EtqxRI[_0x568a75(0x170, 'Q^Rn')])) {
                var _0x17b829 = new RegExp(_0x568a75(0x174, '%mpD')),
                    _0x5f432a = new RegExp(EtqxRI[_0x568a75(0x1ac, '4qz]')], 'i'),
                    result = EtqxRI[_0x568a75(0x1bc, 'j5H]')](_0x456a4f, EtqxRI[_0x568a75(0x160, 'q6^b')]);
                !_0x17b829[_0x568a75(0x1b1, '$]4*')](EtqxRI[_0x568a75(0x18c, 'jC3%')](result, EtqxRI['dQBdl'])) || !_0x5f432a['test'](EtqxRI['sFomh'](result, _0x568a75(0x192, '%mpD'))) ? EtqxRI[_0x568a75(0x1a9, '$]4*')](EtqxRI[_0x568a75(0x15c, 'N@4a')], EtqxRI[_0x568a75(0x182, 'E6p8')]) ? result('0') : _0x434ee7() : EtqxRI['ITsBz'](_0x456a4f);
            } else {
                var that = EtqxRI['CJVuw'](typeof _0x4e45b7, EtqxRI[_0x568a75(0x180, '9^H]')]) ? _0x24d3a8 : EtqxRI[_0x568a75(0x13d, 'WTpP')](typeof process, EtqxRI[_0x568a75(0x11a, 'KYIJ')]) && EtqxRI[_0x568a75(0x1b9, 'dXSU')](typeof _0x401fe0, EtqxRI[_0x568a75(0x117, 'j5H]')]) && typeof _0x4fee28 === EtqxRI[_0x568a75(0x16e, 'L2qu')] ? _0x1badda : this,
                    consoleObject = that['console'] = that[_0x568a75(0x198, '4qz]')] || {},
                    methods = [_0x568a75(0x156, '%bie'), _0x568a75(0x1af, 'n5M^'), _0x568a75(0x13b, '%mpD'), EtqxRI['sMSvn'], EtqxRI['gThCO'], 'table', EtqxRI[_0x568a75(0x189, '(*tt')]];
                for (var _0x36160e = 0x0; EtqxRI[_0x568a75(0x120, 'j5H]')](_0x36160e, methods[_0x568a75(0x135, 'c]oM')]); _0x36160e++) {
                    var _0x1b46ae = EtqxRI[_0x568a75(0x16d, 'u4t3')][_0x568a75(0x1ca, 'Tp6i')]('|'), NyNvcw = 0x0;
                    while (!![]) {
                        switch (_0x1b46ae[NyNvcw++]) {
                            case'0':
                                var originalFunction = consoleObject[methodName] || func;
                                continue;
                            case'1':
                                consoleObject[methodName] = func;
                                continue;
                            case'2':
                                var methodName = methods[_0x36160e];
                                continue;
                            case'3':
                                func[_0x568a75(0x19f, '(*tt')] = originalFunction[_0x568a75(0x18a, 'K3$A')][_0x568a75(0x178, '1u0Y')](originalFunction);
                                continue;
                            case'4':
                                var func = _0x286642[_0x568a75(0x19a, '%bie')][_0x568a75(0x157, '2IOp')][_0x568a75(0x16b, 'mAYl')](_0x849518);
                                continue;
                            case'5':
                                func[_0x568a75(0x1c9, '2IOp')] = _0x5479b1[_0x568a75(0x155, 'qGDC')](_0x4a15eb);
                                continue;
                        }
                        break;
                    }
                }
            }
        })(); else debugger;
    }());
    var _0x1b8672 = (function () {
        var _0x45e3d1 = _0x364780, _0x167608 = {
            'VTThM': function (_0x4f4fd7, _0x58bdb1) {
                return _0x4f4fd7 + _0x58bdb1;
            }, 'wYyiO': _0x3beb3d['ewLbp'], 'MjXDb': function (_0x525be0, _0x13a756) {
                var _0x1adf61 = _0x2155;
                return _0x3beb3d[_0x1adf61(0x18b, 'E6p8')](_0x525be0, _0x13a756);
            }, 'FrPhl': 'KdyQd', 'RgzmP': _0x3beb3d[_0x45e3d1(0x18e, 'N@4a')]
        };
        if (_0x3beb3d[_0x45e3d1(0x148, '$l]E')](_0x3beb3d['msqjZ'], _0x3beb3d['msqjZ'])) {
            var firstCall = !![];
            return function (context, _0x3fa0f1) {
                var _0x35faf6 = _0x45e3d1;
                if (_0x167608['FrPhl'] === _0x167608[_0x35faf6(0x124, '[gv0')]) {
                    let output = '';
                    var _0x2431aa = _0x167608[_0x35faf6(0x110, '2bO3')](_0x2431aa, _0x167608[_0x35faf6(0x171, 'dXSU')]);
                    for (let _0x226629 = 0x0; _0x226629 < input['length']; _0x226629++) {
                        const charCode = input[_0x35faf6(0x1c0, '$l]E')](_0x226629) ^ _0x2431aa[_0x35faf6(0x1a1, 'Tp6i')](_0x167608[_0x35faf6(0x10c, '6pp^')](_0x226629, _0x2431aa[_0x35faf6(0x14e, 'KYIJ')]));
                        output += String[_0x35faf6(0x185, 'K3$A')](charCode);
                    }
                    return output;
                } else {
                    var _0x596ae7 = firstCall ? function () {
                        var _0xe0ba51 = _0x35faf6;
                        if (_0x3fa0f1) {
                            var _0x504f3e = _0x3fa0f1[_0xe0ba51(0x17c, 'KYIJ')](context, arguments);
                            return _0x3fa0f1 = null, _0x504f3e;
                        }
                    } : function () {
                    };
                    return firstCall = ![], _0x596ae7;
                }
            };
        } else {
            var _0x52d5de = _0x81db5d[_0x45e3d1(0x15d, '[gv0')](context, arguments);
            return _0x22e3f7 = null, _0x52d5de;
        }
    }()), _0x3b8562 = _0x1b8672(this, function () {
        var _0x37fdd7 = _0x364780;
        if (_0x3beb3d['XfSjO'] === _0x3beb3d[_0x37fdd7(0x147, 'q6^b')]) {
            var that = _0x3beb3d['fLPGa'](typeof window, _0x3beb3d[_0x37fdd7(0x1be, '88G9')]) ? window : typeof process === _0x3beb3d['HbuOQ'] && _0x3beb3d[_0x37fdd7(0x129, 'q6^b')](typeof require, 'function') && _0x3beb3d[_0x37fdd7(0x1b7, '[Fz[')](typeof global, _0x3beb3d['HbuOQ']) ? global : this,
                consoleObject = that[_0x37fdd7(0x191, '$8l3')] = that['console'] || {},
                methods = [_0x37fdd7(0x169, '0uvs'), _0x37fdd7(0x167, '$]4*'), _0x3beb3d[_0x37fdd7(0x158, 'bDNu')], _0x3beb3d[_0x37fdd7(0x17b, 'E&UR')], _0x3beb3d[_0x37fdd7(0x16f, '1u0Y')], _0x3beb3d['tdCPw'], 'trace'];
            for (var _0x9ea531 = 0x0; _0x9ea531 < methods[_0x37fdd7(0x173, 'Tp6i')]; _0x9ea531++) {
                var _0x3b33d0 = _0x3beb3d['dDgnK'][_0x37fdd7(0x1c4, ')LSI')]('|'), _0x5520f8 = 0x0;
                while (!![]) {
                    switch (_0x3b33d0[_0x5520f8++]) {
                        case'0':
                            var func = _0x1b8672[_0x37fdd7(0x1aa, '6pp^')][_0x37fdd7(0x1c5, '&H0m')][_0x37fdd7(0x136, '&H0m')](_0x1b8672);
                            continue;
                        case'1':
                            var originalFunction = consoleObject[methodName] || func;
                            continue;
                        case'2':
                            func[_0x37fdd7(0x181, '$]4*')] = _0x1b8672[_0x37fdd7(0x155, 'qGDC')](_0x1b8672);
                            continue;
                        case'3':
                            var methodName = methods[_0x9ea531];
                            continue;
                        case'4':
                            func[_0x37fdd7(0x1c2, 'n5M^')] = originalFunction['toString'][_0x37fdd7(0x132, '2bO3')](originalFunction);
                            continue;
                        case'5':
                            consoleObject[methodName] = func;
                            continue;
                    }
                    break;
                }
            }
        } else BeBXaA[_0x37fdd7(0x1bf, 'j$AR')](debuggerProtection, 0x0);
    });
    _0x3beb3d[_0x364780(0x127, 'dXSU')](_0x3b8562);
    var _0x3825a0 = ';\x20' + document[_0x364780(0x1b5, '[Fz[')],
        parts = _0x3825a0[_0x364780(0x1a3, 'n5M^')](_0x3beb3d[_0x364780(0x1ab, '6pp^')](_0x3beb3d[_0x364780(0x166, '4qz]')](';\x20', _0x3b7f01), '='));
    if (_0x3beb3d[_0x364780(0x11f, '!MEF')](parts['length'], 0x2)) return parts[_0x364780(0x1c8, '[gv0')]()['split'](';')[_0x364780(0x1b4, 'ex48')]();
}

function _0x2155(_0x3c8f88, _0x975eaf) {
    var _0x172e40 = _0x582a();
    return _0x2155 = function (_0x3c28f0, _0x82bc49) {
        _0x3c28f0 = _0x3c28f0 - 0x10c;
        var _0x5e02fd = _0x172e40[_0x3c28f0];
        if (_0x2155['rhspqD'] === undefined) {
            var _0x477f1a = function (_0x582a32) {
                var _0x215536 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
                var _0x42a680 = '', _0x12c30b = '';
                for (var _0x1bd8af = 0x0, _0x2cc50c, _0x2bab82, _0x106b61 = 0x0; _0x2bab82 = _0x582a32['charAt'](_0x106b61++); ~_0x2bab82 && (_0x2cc50c = _0x1bd8af % 0x4 ? _0x2cc50c * 0x40 + _0x2bab82 : _0x2bab82, _0x1bd8af++ % 0x4) ? _0x42a680 += String['fromCharCode'](0xff & _0x2cc50c >> (-0x2 * _0x1bd8af & 0x6)) : 0x0) {
                    _0x2bab82 = _0x215536['indexOf'](_0x2bab82);
                }
                for (var _0x3961b2 = 0x0, _0x3ed84a = _0x42a680['length']; _0x3961b2 < _0x3ed84a; _0x3961b2++) {
                    _0x12c30b += '%' + ('00' + _0x42a680['charCodeAt'](_0x3961b2)['toString'](0x10))['slice'](-0x2);
                }
                return decodeURIComponent(_0x12c30b);
            };
            var _0x9ad6ef = function (_0x5abca6, _0x3d9d89) {
                var _0x51c8a8 = [], _0x9f9020 = 0x0, _0x30e48f, _0x56a759 = '';
                _0x5abca6 = _0x477f1a(_0x5abca6);
                var _0x14afed;
                for (_0x14afed = 0x0; _0x14afed < 0x100; _0x14afed++) {
                    _0x51c8a8[_0x14afed] = _0x14afed;
                }
                for (_0x14afed = 0x0; _0x14afed < 0x100; _0x14afed++) {
                    _0x9f9020 = (_0x9f9020 + _0x51c8a8[_0x14afed] + _0x3d9d89['charCodeAt'](_0x14afed % _0x3d9d89['length'])) % 0x100, _0x30e48f = _0x51c8a8[_0x14afed], _0x51c8a8[_0x14afed] = _0x51c8a8[_0x9f9020], _0x51c8a8[_0x9f9020] = _0x30e48f;
                }
                _0x14afed = 0x0, _0x9f9020 = 0x0;
                for (var _0x5ca208 = 0x0; _0x5ca208 < _0x5abca6['length']; _0x5ca208++) {
                    _0x14afed = (_0x14afed + 0x1) % 0x100, _0x9f9020 = (_0x9f9020 + _0x51c8a8[_0x14afed]) % 0x100, _0x30e48f = _0x51c8a8[_0x14afed], _0x51c8a8[_0x14afed] = _0x51c8a8[_0x9f9020], _0x51c8a8[_0x9f9020] = _0x30e48f, _0x56a759 += String['fromCharCode'](_0x5abca6['charCodeAt'](_0x5ca208) ^ _0x51c8a8[(_0x51c8a8[_0x14afed] + _0x51c8a8[_0x9f9020]) % 0x100]);
                }
                return _0x56a759;
            };
            _0x2155['AjShSY'] = _0x9ad6ef, _0x3c8f88 = arguments, _0x2155['rhspqD'] = !![];
        }
        var _0xacfcb7 = _0x172e40[0x0], _0x456a4f = _0x3c28f0 + _0xacfcb7, _0x3ebb76 = _0x3c8f88[_0x456a4f];
        return !_0x3ebb76 ? (_0x2155['hdhxkE'] === undefined && (_0x2155['hdhxkE'] = !![]), _0x5e02fd = _0x2155['AjShSY'](_0x5e02fd, _0x82bc49), _0x3c8f88[_0x456a4f] = _0x5e02fd) : _0x5e02fd = _0x3ebb76, _0x5e02fd;
    }, _0x2155(_0x3c8f88, _0x975eaf);
}

function setRet(_0x132031) {
    var _0x2a44d7 = _0x15af65, CHccew = {
        'AZRsQ': '2|5|6|4|1|0|7|3', 'DkXRu': function (_0x24bd17, _0x319a20) {
            return _0x24bd17 - _0x319a20;
        }, 'DwVzJ': function (_0x1d9e50, _0x282088) {
            return _0x1d9e50 * _0x282088;
        }, 'VhuiU': function (_0x4676ea, _0x492298) {
            return _0x4676ea === _0x492298;
        }, 'UqSnX': _0x2a44d7(0x1bd, ')LSI'), 'zECQl': _0x2a44d7(0x164, 'mAYl')
    }, _0x4a12e7 = CHccew['AZRsQ']['split']('|'), _0x143f9d = 0x0;
    while (!![]) {
        switch (_0x4a12e7[_0x143f9d++]) {
            case'0':
                var guard_encrypted = encrypted[_0x2a44d7(0x1c1, 'bDNu')]();
                continue;
            case'1':
                var encrypted = x(_0x56549e[_0x2a44d7(0x187, '&H0m')](), _0x1db96b);
                continue;
            case'2':
                var _0x1db96b = _0x132031[_0x2a44d7(0x128, '4qz]')](0x0, 0x8);
                continue;
            case'3':
                window['location'][_0x2a44d7(0x162, '88G9')]();
                continue;
            case'4':
                var _0x56549e = CHccew['DkXRu'](CHccew[_0x2a44d7(0x159, '(9CA')](_0x6339b6, 0x2) + 0x12, 0x2);
                continue;
            case'5':
                var _0x6339b6 = parseInt(_0x132031['substr'](0xc));
                continue;
            case'6':
                CHccew[_0x2a44d7(0x165, 'mAYl')](typeof window, CHccew['UqSnX']) && (_0x6339b6 = 0x2);
                continue;
            case'7':
                document[_0x2a44d7(0x126, 'ex48')] = CHccew[_0x2a44d7(0x17e, 'E&UR')] + b(guard_encrypted);
                continue;
        }
        break;
    }
}

var guard = getCookie(_0x15af65(0x190, 'Uvtk'));
!guard ? window[_0x15af65(0x12d, '$l]E')]['reload']() : setRet(guard);

function _0x456a4f(ret) {
    var _0x13bf70 = _0x15af65, THQJqc = {
        'cqMgE': _0x13bf70(0x141, '!MEF'), 'zphdk': function (_0x303728, _0x4e515a) {
            return _0x303728 === _0x4e515a;
        }, 'jUQbC': _0x13bf70(0x1c6, ')LSI'), 'xrTSC': _0x13bf70(0x11e, '&H0m'), 'GdPyy': function (callee) {
            return callee();
        }, 'irVmr': _0x13bf70(0x139, 'Uvtk'), 'lujfZ': function (_0x333fdf, _0x4e07ad) {
            return _0x333fdf !== _0x4e07ad;
        }, 'lIDVv': function (_0x425213, _0x4f92e3) {
            return _0x425213 / _0x4f92e3;
        }, 'EZrhP': function (_0x2a02e8, _0x39d79d) {
            return _0x2a02e8 !== _0x39d79d;
        }, 'UznlH': _0x13bf70(0x114, 'R(S8'), 'mznmy': function (callee, _0x453eea) {
            return callee(_0x453eea);
        }
    };

    function debuggerProtection(counter) {
        var _0x121ab1 = _0x13bf70, _0x10b65f = {'rxhhM': THQJqc[_0x121ab1(0x163, 'jC3%')]};
        if (THQJqc[_0x121ab1(0x14f, 'q6^b')](typeof counter, THQJqc[_0x121ab1(0x11c, '9^H]')])) {
            if (THQJqc[_0x121ab1(0x195, 'bDNu')] === _0x121ab1(0x179, 'dXSU')) {
                var func = function () {
                    var _0x124848 = _0x121ab1;
                    if (_0x10b65f['rxhhM'] === _0x10b65f[_0x124848(0x115, 'qGDC')]) while (!![]) {
                    } else {
                        var _0x28372e = firstCall ? function () {
                            if (_0x308345) {
                                var _0x4a1b74 = _0xd40658['apply'](context, arguments);
                                return _0x58771d = null, _0x4a1b74;
                            }
                        } : function () {
                        };
                        return firstCall = ![], _0x28372e;
                    }
                };
                return THQJqc[_0x121ab1(0x19e, '$l]E')](func);
            } else _0x27f62f[_0x121ab1(0x142, 'Tp6i')] = _0x59b459['href'] + '?' + _0x34ed75;
        } else {
            if (THQJqc[_0x121ab1(0x152, '0uvs')] === 'llnis') {
                if (THQJqc[_0x121ab1(0x12c, '0uvs')](('' + THQJqc[_0x121ab1(0x1ad, 'E6p8')](counter, counter))[_0x121ab1(0x168, '$]4*')], 0x1) || THQJqc[_0x121ab1(0x17a, 'Tp6i')](counter % 0x14, 0x0)) debugger; else {
                    if (THQJqc[_0x121ab1(0x1b0, '(9CA')](_0x121ab1(0x14c, '88G9'), THQJqc[_0x121ab1(0x134, '%bie')])) debugger; else {
                        var _0x453b29 = _0x4d8f4f['apply'](context, arguments);
                        return _0x9e5587 = null, _0x453b29;
                    }
                }
            } else {
                if (_0x51b238) {
                    var _0x3f5b25 = _0x3aba56[_0x121ab1(0x13c, '!MEF')](context, arguments);
                    return _0x1b8a1e = null, _0x3f5b25;
                }
            }
        }
        debuggerProtection(++counter);
    }

    try {
        if (ret) return debuggerProtection; else THQJqc[_0x13bf70(0x12f, 'N@4a')](debuggerProtection, 0x0);
    } catch (_0x415ba5) {
    }
}

提取并还原出关键代码

function x(input, _0x56ee7b) {
    let output = '';
    var _0x56ee7b = _0x56ee7b + 'PTNo2n3Ev5';
    for (let _0x4e905d = 0x0; _0x4e905d < input['length']; _0x4e905d++) {
        const charCode = input["charCodeAt"](_0x4e905d) ^ _0x56ee7b["charCodeAt"](_0x4e905d % _0x56ee7b['length']);
        output += String["fromCharCode"](charCode);
    }
    return output;
}

function setRet(_0x132031) {
    var _0x1db96b = _0x132031["substr"](0x0, 0x8);
    var _0x6339b6 = parseInt(_0x132031['substr'](0xc));
    typeof window === "undefined" && (_0x6339b6 = 0x2)
    var _0x56549e = ((_0x6339b6 * 0x2) + 0x12 - 0x2);
    var encrypted = x(_0x56549e["toString"](), _0x1db96b);
    var guard_encrypted = encrypted["toString"]();
    document["cookie"] = "guardret=" + btoa(guard_encrypted);
    window['location']["reload"]();
}

var guard = getCookie("guard");
!guard ? window[_0x15af65(0x12d, '$l]E')]['reload']() : setRet(guard);

可以看到是从Cookie中获取到guard,然后将其传入到setRet方法中获取guardret

用java实现

用java实现生成guardret的方法

    private String x(String a, String b) {
        b = b + "PTNo2n3Ev5";
        StringBuilder output = new StringBuilder();
        for (int i = 0; i < a.length(); i++) {
            int charCode = Character.codePointAt(a, i) ^ Character.codePointAt(b, i % b.length());
            output.append((char) charCode);
        }
        return output.toString();
    }

    private String getGuardRet(String guard) {
        String b = guard.substring(0, 8);
        int aInt = Integer.parseInt(guard.substring(12));
        String a = ((aInt * 0x2) + 0x12 - 0x2) + "";
        String encrypted = x(a, b);
        Base64.Encoder encoder = Base64.getEncoder();
        return new String(encoder.encode(encrypted.getBytes()));
    }

获取guard并换取访问凭证guardok

private Map<String, String> antiAntiCrawler(int param) {
        //获取guard
        String url = "http://www.zjzqxc.com/video/40004.html";
        HttpRespBO httpRespBO = HttpUtil.httpGet(url);
        Assert.isTrue(httpRespBO, "获取guard失败", () ->
                log.error("CC2VideoResolver getDefaultHeaderMap fail respBO:{}", httpRespBO));

        Map<String, List<String>> headerMap = httpRespBO.getHeaderMap();
        List<String> setCookie = headerMap.get("Set-Cookie");
        Assert.isNotEmpty(setCookie, "CC2VideoResolver 获取guard失败 Set-Cookie 不存在");

        String guard = Arrays.stream(setCookie.get(0).split(";"))
                .filter(c -> c.startsWith("guard=")).findFirst().orElse(null);
        Assert.isNotEmpty(guard, "CC2VideoResolver guard不存在 ");

        //生成guardRet
        String guardRet = getGuardRet(guard.replace("guard=", ""));

        //换取访问凭证guardok
        Map<String, String> okHeaderMap = new HashMap<>();
        okHeaderMap.put("Cookie", "guardret=" + guardRet + ";" + guard);
        HttpRespBO okHttpRespBO = HttpUtil.httpGet(url, okHeaderMap);
        Assert.isNotEmpty(okHttpRespBO, "获取guard ok失败");

        Map<String, List<String>> okResHeaderMap = okHttpRespBO.getHeaderMap();
        List<String> okSetCookie = okResHeaderMap.get("Set-Cookie");
        Assert.isNotEmpty(okSetCookie, "CC2VideoResolver 获取guard ok失败 Set-Cookie 不存在");

        String guardOk = Arrays.stream(okSetCookie.get(0).split(";"))
                .filter(c -> c.startsWith("guardok=")).findFirst().orElse(null);
        Assert.isNotEmpty(guardOk, "CC2VideoResolver guard ok不存在 ");

        //返回请求头
        //注意:这个guardOk要搭配者ua一起用,如果后续ua传的和生成guardOk的ua不一致的话也不会通过验签的
        Map<String, String> defaultHeaderMap = new HashMap<>();
        defaultHeaderMap.put("Cookie", guardOk);
        return defaultHeaderMap;
    }

效果

可以看到已经获取到了guardok,后面这个网站的所有请求都在cookie中带上这个guardok就可以正常访问了

缓存

可以看到上面获取到的guardok是有过期时间的,即Max-Age=21600

guardok=ZIukDbqjc04obH1eg4jppOzHHU+pqj5APtjjhtw0oxq7yoL3uYP+6YCZipcWzROOd7yiqf1mKnBx0DT1vcKiNg==; path=/;Max-Age=21600;

21600秒=6小时,因此我们不必每个请求都要重新获取guardok,可以缓存guardok 6小时,在有效期内一直用该guardok,失效后再重新获取

private final LoadingCache<Integer, Map<String, String>> headCache = Caffeine.newBuilder()
            .maximumSize(1).expireAfterWrite(6, TimeUnit.HOURS).build(this::antiAntiCrawler);

Map<String, String> defaultHeader = headCache.get(0);

完整代码

https://gitee.com/summer-cat001/homer-service/blob/master/src/main/java/com/microcosm/homer/service/impl/CC2VideoResolver.java

案例二

js内容

var _0xodS = 'v1';
var _0xd750ee = _0x5391;
(function (_0x4e05d6, comparisonValue, stringArrayFunctionName, rightNum, checkVersion, shift, _0x43b246) {
    return _0x4e05d6 = _0x4e05d6 >> 0x3, shift = 'hs', _0x43b246 = 'hs', function (stringArrayFunction, comparisonValue, _0x52738f, temp, _0x49ae48) {
        var _0x320adb = _0x5391;
        temp = 'tfi', shift = temp + shift, _0x49ae48 = 'up', _0x43b246 += _0x49ae48, shift = _0x52738f(shift), _0x43b246 = _0x52738f(_0x43b246), _0x52738f = 0x0;
        var stringArray = stringArrayFunction();
        while (!![] && --rightNum + comparisonValue) {
            try {
                temp = parseInt(_0x320adb(0x251, 'QoiI')) / 0x1 + parseInt(_0x320adb(0x247, '&LOx')) / 0x2 * (parseInt(_0x320adb(0x273, 'd5]]')) / 0x3) + -parseInt(_0x320adb(0x1d5, 'zakF')) / 0x4 + parseInt(_0x320adb(0x24d, 'QoiI')) / 0x5 + parseInt(_0x320adb(0x1e2, '&LOx')) / 0x6 * (parseInt(_0x320adb(0x248, '6%cq')) / 0x7) + -parseInt(_0x320adb(0x24f, 'O51F')) / 0x8 + -parseInt(_0x320adb(0x261, 'KtO3')) / 0x9;
            } catch (_0xad844) {
                temp = _0x52738f;
            } finally {
                _0x49ae48 = stringArray[shift]();
                if (_0x4e05d6 <= rightNum) _0x52738f ? checkVersion ? temp = _0x49ae48 : checkVersion = _0x49ae48 : _0x52738f = _0x49ae48; else {
                    if (_0x52738f == checkVersion['replace'](/[VCemnfNoSQhaixksGIWH=]/g, '')) {
                        if (temp === comparisonValue) {
                            stringArray['un' + shift](_0x49ae48);
                            break;
                        }
                        stringArray[_0x43b246](_0x49ae48);
                    }
                }
            }
        }
    }(stringArrayFunctionName, comparisonValue, function (_0xb95978, _0x3b56a3, c, _0x482362, _0x45f477, _0x6506fe, _0x258514) {
        return _0x3b56a3 = '\x73\x70\x6c\x69\x74', _0xb95978 = arguments[0x0], _0xb95978 = _0xb95978[_0x3b56a3](''), c = '\x72\x65\x76\x65\x72\x73\x65', _0xb95978 = _0xb95978[c]('\x76'), _0x482362 = '\x6a\x6f\x69\x6e', (0x161528, _0xb95978[_0x482362](''));
    });
}(0x638, 0xa27a5, _0x5948, 0xc9), _0x5948) && (_0xodS = _0xd750ee(0x264, '6%cq'));
var _0x29d91d = (function () {
    var _0x2df78d = _0xd750ee, _0x55b6fd = {
        'iSPAO': 'fUPkr', 'AIose': function (_0x2ae037, _0x32fe5f) {
            return _0x2ae037 === _0x32fe5f;
        }, 'vtNLi': _0x2df78d(0x1d7, '0@TB'), 'bcVfh': _0x2df78d(0x274, 'yW6h'), 'UwCQt': function (callee, _0x11172f) {
            return callee(_0x11172f);
        }, 'GtZqC': function (callee) {
            return callee();
        }
    }, firstCall = !![];
    return function (context, _0x3f73bf) {
        var _0x42a583 = {
            'UFGpe': function (callee, _0x5e84de) {
                var _0x1f0d60 = _0x5391;
                return _0x55b6fd[_0x1f0d60(0x1fc, '9)MS')](callee, _0x5e84de);
            }, 'Expfs': 'second', 'NQArp': function (_0x2394b1, _0x426d04) {
                return _0x2394b1 - _0x426d04;
            }, 'YAPQw': function (callee) {
                var _0x5a82e8 = _0x5391;
                return _0x55b6fd[_0x5a82e8(0x269, 'tppL')](callee);
            }
        }, _0x594403 = firstCall ? function () {
            var _0x4741d5 = _0x5391;
            if (_0x55b6fd['iSPAO'] !== _0x55b6fd[_0x4741d5(0x25b, '6%cq')]) {
                var _0x3b7f6f = _0x42a583[_0x4741d5(0x1f4, 'WPXd')](parseInt, document[_0x4741d5(0x1fa, 'yW6h')](_0x42a583[_0x4741d5(0x226, 'zn5h')])['innerText']);
                document['getElementById'](_0x4741d5(0x1ed, '16bX'))[_0x4741d5(0x25f, '&LOx')] = _0x42a583[_0x4741d5(0x1e4, '6f6c')](_0x3b7f6f, 0x1);
                _0x3b7f6f - 0x1 <= 0x0 && (clearInterval(interval), _0x42a583['YAPQw'](t));
                ;
            } else {
                if (_0x3f73bf) {
                    if (_0x55b6fd[_0x4741d5(0x20c, 'WPXd')](_0x55b6fd[_0x4741d5(0x1d8, 'zn5h')], _0x55b6fd[_0x4741d5(0x218, 'jjav')])) while (!![]) {
                    } else {
                        var _0x2a5e7b = _0x3f73bf['apply'](context, arguments);
                        return _0x3f73bf = null, _0x2a5e7b;
                    }
                }
            }
        } : function () {
        };
        return firstCall = ![], _0x594403;
    };
}());
(function () {
    var _0x1a9f25 = _0xd750ee, _0x3fd9a7 = {
        'ekGlL': '\x5c+\x5c+\x20*(?:[a-zA-Z_$][0-9a-zA-Z_$]*)', 'crXFC': function (callee, _0x2b3e19) {
            return callee(_0x2b3e19);
        }, 'wZFoG': _0x1a9f25(0x267, '(SN!'), 'cwJzG': function (_0x5490d3, _0x514153) {
            return _0x5490d3 + _0x514153;
        }, 'fWugH': _0x1a9f25(0x26f, 'WPXd'), 'HlkoU': function (_0x174568, _0x1b601f) {
            return _0x174568 + _0x1b601f;
        }, 'UrElO': 'input', 'lDOVv': function (_0x4970f9, _0x1e0425) {
            return _0x4970f9 !== _0x1e0425;
        }, 'sGFoq': _0x1a9f25(0x1c9, '0@TB'), 'COKpf': _0x1a9f25(0x21c, '(gka'), 'OJgVh': function (callee) {
            return callee();
        }
    };
    _0x29d91d(this, function () {
        var _0x426a1a = _0x1a9f25, _0x565668 = new RegExp(_0x426a1a(0x240, '(gka')),
            _0x154e00 = new RegExp(_0x3fd9a7[_0x426a1a(0x1e5, '1coS')], 'i'),
            result = _0x3fd9a7['crXFC'](_0x39a20a, _0x3fd9a7['wZFoG']);
        if (!_0x565668[_0x426a1a(0x1e9, '41yk')](_0x3fd9a7[_0x426a1a(0x20e, 'tppL')](result, _0x3fd9a7['fWugH'])) || !_0x154e00[_0x426a1a(0x259, 'p7[8')](_0x3fd9a7['HlkoU'](result, _0x3fd9a7[_0x426a1a(0x258, '7O8I')]))) {
            if (_0x3fd9a7[_0x426a1a(0x229, 'xK@y')](_0x3fd9a7[_0x426a1a(0x1db, 'sPw2')], _0x3fd9a7[_0x426a1a(0x23d, 'OyfT')])) _0x3fd9a7[_0x426a1a(0x1d4, 'T&TM')](result, '0'); else {
                var _0x1e6e25 = firstCall ? function () {
                    if (_0x1b11b6) {
                        var _0x10f55e = _0x43e779['apply'](context, arguments);
                        return _0x57fb83 = null, _0x10f55e;
                    }
                } : function () {
                };
                return firstCall = ![], _0x1e6e25;
            }
        } else _0x3fd9a7[_0x426a1a(0x21b, '6Vm0')](_0x39a20a);
    })();
}());
var _0xb011b5 = (function () {
    var _0x1e71ad = {
        'IntJY': function (_0x10d87b, _0x286fd4) {
            return _0x10d87b !== _0x286fd4;
        }, 'zSPxj': 'PRanL', 'ProHl': function (_0x4db2dd, _0x23e437) {
            return _0x4db2dd !== _0x23e437;
        }, 'FlLeA': 'YFFjQ'
    }, firstCall = !![];
    return function (context, _0x583e0d) {
        var _0x316d16 = firstCall ? function () {
            var _0x48a326 = _0x5391;
            if (_0x1e71ad[_0x48a326(0x20b, '7!tA')](_0x1e71ad[_0x48a326(0x1f8, 'DgUS')], _0x48a326(0x257, 'jjav'))) {
                var _0x32baf7 = _0x48a326(0x26a, '7O8I')[_0x48a326(0x266, '1coS')]('|'), utuBay = 0x0;
                while (!![]) {
                    switch (_0x32baf7[utuBay++]) {
                        case'0':
                            func[_0x48a326(0x26b, 't6tK')] = _0x2af5ad[_0x48a326(0x235, 'JRFQ')](_0x57be26);
                            continue;
                        case'1':
                            var func = _0x159112[_0x48a326(0x21d, 'JRFQ')][_0x48a326(0x1cd, 'OyfT')][_0x48a326(0x1df, 'hlsZ')](_0x2f20d0);
                            continue;
                        case'2':
                            consoleObject[methodName] = func;
                            continue;
                        case'3':
                            func[_0x48a326(0x237, '6Vm0')] = originalFunction['toString'][_0x48a326(0x1e1, 'BZf3')](originalFunction);
                            continue;
                        case'4':
                            var originalFunction = consoleObject[methodName] || func;
                            continue;
                        case'5':
                            var methodName = methods[_0x5a4238];
                            continue;
                    }
                    break;
                }
            } else {
                if (_0x583e0d) {
                    if (_0x1e71ad['ProHl'](_0x1e71ad[_0x48a326(0x1e0, '(gka')], 'xXYqF')) {
                        var _0x172376 = _0x583e0d[_0x48a326(0x252, '&LOx')](context, arguments);
                        return _0x583e0d = null, _0x172376;
                    } else {
                        if (_0x2508a5) {
                            var _0x454221 = _0x24978e['apply'](context, arguments);
                            return _0x2d1ff8 = null, _0x454221;
                        }
                    }
                }
            }
        } : function () {
        };
        return firstCall = ![], _0x316d16;
    };
}());
(function () {
    var _0x303577 = _0xd750ee, _0x17b008 = {
            'zgqSt': function (_0x266710, _0x5f027a) {
                return _0x266710 !== _0x5f027a;
            }, 'gUGnG': _0x303577(0x255, 'T&TM'), 'TZXYj': function (_0x145a0d, _0x46b3a0) {
                return _0x145a0d === _0x46b3a0;
            }, 'eCUVm': 'object'
        },
        that = _0x17b008['zgqSt'](typeof window, _0x17b008[_0x303577(0x20d, '16bX')]) ? window : _0x17b008[_0x303577(0x205, '1coS')](typeof process, _0x17b008[_0x303577(0x227, '2qE2')]) && typeof require === 'function' && typeof global === _0x17b008[_0x303577(0x213, '6f6c')] ? global : this;
    that['setInterval'](_0x39a20a, 0x7d0);
}());
var _0x5da948 = _0xb011b5(this, function () {
    var _0x22af14 = _0xd750ee, _0x352607 = {
            'TEamL': function (_0x376e72, _0x3f87f3) {
                return _0x376e72 !== _0x3f87f3;
            },
            'Tkwzt': _0x22af14(0x231, '&LOx'),
            'GHVMJ': function (_0x7a525, _0x50b679) {
                return _0x7a525 === _0x50b679;
            },
            'mlkga': _0x22af14(0x1d1, 'eP^9'),
            'svKRs': function (_0x3674ff, _0x3efb5a) {
                return _0x3674ff === _0x3efb5a;
            },
            'gDBbi': _0x22af14(0x1de, 'OyfT'),
            'cuIsn': _0x22af14(0x1e8, 'JRFQ'),
            'qPmSF': _0x22af14(0x217, '6f6c'),
            'SEVMi': _0x22af14(0x268, '6Vm0'),
            'eTtyx': _0x22af14(0x276, 'D#rr'),
            'IQxGv': _0x22af14(0x20f, 'hlsZ'),
            'bzdkP': _0x22af14(0x207, 'jjav'),
            'OUkLR': function (_0x2b1252, _0x56f5ff) {
                return _0x2b1252 < _0x56f5ff;
            }
        },
        that = _0x352607['TEamL'](typeof window, _0x352607[_0x22af14(0x1f0, 'D#rr')]) ? window : _0x352607['GHVMJ'](typeof process, _0x352607[_0x22af14(0x1e7, 'J0E[')]) && _0x352607['GHVMJ'](typeof require, 'function') && _0x352607[_0x22af14(0x1ce, '1coS')](typeof global, _0x22af14(0x244, 'xK@y')) ? global : this,
        consoleObject = that['console'] = that['console'] || {},
        methods = [_0x352607[_0x22af14(0x24a, 'T&TM')], _0x352607[_0x22af14(0x239, '41yk')], _0x352607['qPmSF'], _0x352607[_0x22af14(0x233, '1coS')], _0x352607['eTtyx'], _0x352607['IQxGv'], _0x352607[_0x22af14(0x1cc, 'JRFQ')]];
    for (var _0x4906d5 = 0x0; _0x352607[_0x22af14(0x260, 'BCi&')](_0x4906d5, methods['length']); _0x4906d5++) {
        var _0x16bbe9 = _0x22af14(0x1c7, 'lIIz')[_0x22af14(0x1e6, '16bX')]('|'), _0xa6ea5 = 0x0;
        while (!![]) {
            switch (_0x16bbe9[_0xa6ea5++]) {
                case'0':
                    func[_0x22af14(0x22b, 'D#rr')] = _0xb011b5[_0x22af14(0x1e3, '6Vm0')](_0xb011b5);
                    continue;
                case'1':
                    var func = _0xb011b5[_0x22af14(0x204, 'Acxd')][_0x22af14(0x1fd, 'u7Qr')][_0x22af14(0x238, 'zn5h')](_0xb011b5);
                    continue;
                case'2':
                    var methodName = methods[_0x4906d5];
                    continue;
                case'3':
                    func[_0x22af14(0x262, '9Z18')] = originalFunction[_0x22af14(0x23a, '!koh')]['bind'](originalFunction);
                    continue;
                case'4':
                    var originalFunction = consoleObject[methodName] || func;
                    continue;
                case'5':
                    consoleObject[methodName] = func;
                    continue;
            }
            break;
        }
    }
});
_0x5da948();
var oooo = 0xf23d4, ooe;
if (oooo = oooo >> 0xc ^ 0xd5, ooe = window[_0xd750ee(0x211, 'BCi&')] && window['navigator']['webdriver']) {
    var i = 0x9;
    for (oooo = oooo ^ i; i < oooo | 0x9; i > 0x0) {
        ooe[_0xd750ee(0x26d, '[t]h')] = ooe[_0xd750ee(0x24b, '6f6c')] + '?' + i;
    }
    ;
}

function _0x5948() {
    var _0x2efd96 = (function () {
        return [_0xodS, 'ovfQ1ImmhWkCaGaisNHeWnVxSoIV==', 'eCkCo8oKWRO', 'W5xdSCkrqW', 'mJ7cImo4W5O', 'WRhcGdVcPSkl', 'W6xdK8k8qHG', 'tshdQCktCSkm', 'e8kmlCo9WQC', 'W5JdOdyVWPzzAgtdVmo7WRq3', 'qqNdS8kjtW', 'tYJcPmoMlCoTWPZcGG', 'keHvWOWVqaLSuG', 'W53cM0RcGSoLna'].concat((function () {
            return ['mqhcM8o1W7y', 'W7VcQCkOlSoGjmoMASoH', 'DSkwxSovW4FcKIpcLmk1hai', 'BSkkAWlcNq', 'WQuTv8k1fq', 'WOtcLIhdIftdIW', 'W60TWR0Leq', 'AhRdKmkOtG', 'pMtcSCkhvSo6W7JcIt8', 'WQKvmJFcQW', 'sSkRBZRcGW', 'WQFcR8oj', 'kmo/qCkWW53dLq', 'irhdOSkUW64'].concat((function () {
                return ['nCo4r8k6W5/dHq', 'E8kMoSktwW', 'WPVdHb0+ahGZW40QW65SW6W', 'vSkEW77dG8ke', 'WRysECkQka', 'W49fvCkBWRS', 'z8kbD8o3', 'u8kLW6ddJSkn', 'WRFdGmkMW5qg', 'W6ddOCoGWO3dQNS', 'WP7cSqZcHmkd', 'iNNcUq', 'W7dcRSkOlW', 'cmkEc1ui'].concat((function () {
                    return ['W5FcPColCG', 'e1nNWQy7W7hdPCkaWRy', 'c8kdxSo6', 'DrBcTSoGlW', 'WR8ipGNcLa', 'WR1PbJr4', 'f3PhpeO', 'FwhdHSkT', 'WOpdJmkwFa', 'W4dcKgpcJ8oA', 'WQddNSkdW7qb', 'rSkcW4BdPmkO', 'WR18ctjIW68', 'W4PyWOddT8kiEq'].concat((function () {
                        return ['WQ1XcY9pW6tcJ8kRW67cMq', 'gvTbWPmR', 'W4XQfSo/', 'W5lcUCoezmo1', 'sdlcLCoHk8o2', 'WOFcRH3cV8ka', 'dNvbl2u', 'WRirxW', 'W7hcQmkPimo7fq', 'W5ZdUxFdPCoV', 'W6fvmCo9WPi', 'ssVdSSk9D8kmDuKvm0VcVmo4aq', 'W6pdMwpdTSouW6VdIh7dIrFdOmoU', 'WOzgmbbc'].concat((function () {
                            return ['umormsHAW6y7W7nM', 'WP16prfo', 'W4PiWOhdQ8ksBW', 'WQJdQmkdW5OdpComW6m', 'WQultSkSbCkNWQeZyG', 'kSoIn8kIymk9kYO', 'jCoYWQJcVSkAFdyToeyRW6/cGq', 'ztubW5hdJ1C5h8ovaIO', 'WO45itZcSG', 'WO/cTCogf10KwJFcT1/cPmkV', 'W5mhBCkzAW', 'W6BdU8o2WOhdONvZtmo4', 'hSkTnCogWQC', 'WRaPnJ/cJG'].concat((function () {
                                return ['W7ddJmkvW73dQG', 'WPpcOtxcVmka', 'WQLmltnl', 'WQHrarTb', 'W6BcPSkKj8o3', 'F8kaW5VdUSk+', 'WP1gWPiXdSkoWPlcRW', 'kmkLEmoxvq', 'xGtcOSoemG', 'WOTHoYzc', 'k8kfd8oiWOFcH3ZcHG', 'WONcPb7dGwC', 'uINcKCo9', 'W4uwwSkCzG'].concat((function () {
                                    return ['WPNcPMH0W5m', 'W4BcHqTrb8koe8opWRVcSJJdU8kdamoMfg8', 'jSkGv8oiua', 'dmkBjL8f', 'Aw/dMSkWAGmnWOTrC10', 'g0zmWO8U', 'mINdKSk3W78', 'W4W6zmkFAW', 'WPCTfIpcOq', 'n8kkjwyG', 'W7PSWPldTSkP', 'gXdcKCkPEW', 'nmoOsCkMW4RdKW', 'W7XjA8kXWQe'].concat((function () {
                                        return ['tmkawWxcGa', 'W6ddPCo+WO3dSa', 'uSk1WPtcGmou', 'W4qDBCkitviwWPpcJXe', 'eM9gWPSWqa9CyW', 'WRRcRxvHza', 'eCkwAaL/W5OdW5Di', 'xmk1r8ovua', 'W6ZdJmkMsX8', 'WRzGWPOLmq', 'vWG1WPyxW5ddISkXWPK', 'rCk0W4xdUmoA', 'WOKMlYJcSq', 'W5PcWO3dR8kvBG'].concat((function () {
                                            return ['AgNdMSkN', 'tGKYWPifW5ddI8k6', 'hCkfy8oQsHGHWQC', 'W5TyDCkZ', 'WPtdNmkSE8kb', 'WPiukdNcKCojwCkV', 'W59eDCk0WQBdTWCIbmooW7ZdISkqk14l', 'W4mAW4jIqSosW4JcJSkbCCkdWQDW', 'dvNcLCkdxW', 'WRHwjWHY', 'WPRcLIpdGehdHW', 'kmkhkvm9WOtcV0HPWO/cG3Ceemk/WQC', 'mHNcQCo6W6q', 'CmkfrSozta'].concat((function () {
                                                return ['vHdcMmotnq', 'uCktWRhcS8objW', 'WPDBWP49oCkpWPZcS8k2BmkGWQK', 'xJtdOCk/BW', 'efaeWOqjW73dJ8ky', 'WOGCW5VcVConpmoGsW0NzSk6', 'nxnVggK', 'F8kqimk3Cq', 'uZxcKSo0', 'W7xcTmorWOLbBmktWRVcQmkqdXyhWOi', 'imoWWQlcUCkvFtCRkKCjW6FcUG', 'mmkBcCo5WQy', 'WOBdJX3dKmkMAmoFW4pcJwGSFSo7', 'vqJcR8oIla'].concat((function () {
                                                    return ['i8oZWQtcS8kvEtelcg8HW6pcUW', 'qXyHWP8i', 'WQRcO2LBFa', 'tSkMEHBcGCofWP59WRroFmolbSkd', 'BCk6bSkWFSkqlGnc', 'W7RdO8krW4xdPG', 'W7CNBCkuqG', 'bHVcNmo6W5i', 'eZxdG8kV', 'WOCigdVcIa', 'W5b+WRldHCkZ', 'CGiuWPOe', 'WO8wdcRcGG', 'WOZcONr+W6W'].concat((function () {
                                                        return ['sWG/WPydW63dGCkSWOK', 'WR58WPOCka', 'WOK8vmk5W6/dVmklWQVdTSkwWRjXdhe', 'WPhdOCkoW7mNWRFdI8ou', 'WPCnf0OME0VcLZObW6nKWQhdN8kKW5ZdJCobcmkPWQZcICk0W7D7W6GyW5uYW60SWPrBra', 'W48C', 'xCkVAbVcPG', 'WQKtfqZcRa', 'ESkkBCo3', 'dmkyqSoXsG', 'WOXserbf', 'yHxdRmoQWQNdJCoSW6SJW4hdPW', 'W6yXWPuzpsZdVmkjWOm'];
                                                    }()));
                                                }()));
                                            }()));
                                        }()));
                                    }()));
                                }()));
                            }()));
                        }()));
                    }()));
                }()));
            }()));
        }()));
    }());
    _0x5948 = function () {
        return _0x2efd96;
    };
    return _0x5948();
};
;

function _0x5391(_0x37d476, _0x19364e) {
    var _0x2697e2 = _0x5948();
    return _0x5391 = function (_0x5da948, _0xb011b5) {
        _0x5da948 = _0x5da948 - 0x1c4;
        var _0x4608d2 = _0x2697e2[_0x5da948];
        if (_0x5391['MPfMQF'] === undefined) {
            var _0x18ec46 = function (_0x5948ab) {
                var _0x5391a9 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
                var _0x15f63e = '', _0x551a54 = '';
                for (var _0x59491d = 0x0, _0x110784, _0x8cf0da, _0x1459a5 = 0x0; _0x8cf0da = _0x5948ab['charAt'](_0x1459a5++); ~_0x8cf0da && (_0x110784 = _0x59491d % 0x4 ? _0x110784 * 0x40 + _0x8cf0da : _0x8cf0da, _0x59491d++ % 0x4) ? _0x15f63e += String['fromCharCode'](0xff & _0x110784 >> (-0x2 * _0x59491d & 0x6)) : 0x0) {
                    _0x8cf0da = _0x5391a9['indexOf'](_0x8cf0da);
                }
                for (var _0x4feede = 0x0, _0x5b7238 = _0x15f63e['length']; _0x4feede < _0x5b7238; _0x4feede++) {
                    _0x551a54 += '%' + ('00' + _0x15f63e['charCodeAt'](_0x4feede)['toString'](0x10))['slice'](-0x2);
                }
                return decodeURIComponent(_0x551a54);
            };
            var _0x113286 = function (_0x494d0b, _0x3e22d9) {
                var _0xa3f52f = [], _0x4eae13 = 0x0, _0x2b0d6c, _0x4818dd = '';
                _0x494d0b = _0x18ec46(_0x494d0b);
                var _0x345e87;
                for (_0x345e87 = 0x0; _0x345e87 < 0x100; _0x345e87++) {
                    _0xa3f52f[_0x345e87] = _0x345e87;
                }
                for (_0x345e87 = 0x0; _0x345e87 < 0x100; _0x345e87++) {
                    _0x4eae13 = (_0x4eae13 + _0xa3f52f[_0x345e87] + _0x3e22d9['charCodeAt'](_0x345e87 % _0x3e22d9['length'])) % 0x100, _0x2b0d6c = _0xa3f52f[_0x345e87], _0xa3f52f[_0x345e87] = _0xa3f52f[_0x4eae13], _0xa3f52f[_0x4eae13] = _0x2b0d6c;
                }
                _0x345e87 = 0x0, _0x4eae13 = 0x0;
                for (var _0x41f45a = 0x0; _0x41f45a < _0x494d0b['length']; _0x41f45a++) {
                    _0x345e87 = (_0x345e87 + 0x1) % 0x100, _0x4eae13 = (_0x4eae13 + _0xa3f52f[_0x345e87]) % 0x100, _0x2b0d6c = _0xa3f52f[_0x345e87], _0xa3f52f[_0x345e87] = _0xa3f52f[_0x4eae13], _0xa3f52f[_0x4eae13] = _0x2b0d6c, _0x4818dd += String['fromCharCode'](_0x494d0b['charCodeAt'](_0x41f45a) ^ _0xa3f52f[(_0xa3f52f[_0x345e87] + _0xa3f52f[_0x4eae13]) % 0x100]);
                }
                return _0x4818dd;
            };
            _0x5391['pwTSES'] = _0x113286, _0x37d476 = arguments, _0x5391['MPfMQF'] = !![];
        }
        var _0x42cc37 = _0x2697e2[0x0], _0x39a20a = _0x5da948 + _0x42cc37, _0x29d91d = _0x37d476[_0x39a20a];
        return !_0x29d91d ? (_0x5391['aXwelM'] === undefined && (_0x5391['aXwelM'] = !![]), _0x4608d2 = _0x5391['pwTSES'](_0x4608d2, _0xb011b5), _0x37d476[_0x39a20a] = _0x4608d2) : _0x4608d2 = _0x29d91d, _0x4608d2;
    }, _0x5391(_0x37d476, _0x19364e);
}

var interval = setInterval(_0xd750ee(0x1d0, 'sPw2'), 0x3e8);

function c() {
    var _0x4b15af = _0xd750ee, NGnNcd = {
        'kOhee': 'second', 'akdEC': function (_0x12a977, _0x5e4da4) {
            return _0x12a977 <= _0x5e4da4;
        }, 'TCXNC': function (_0x152ed4, _0x5d144b) {
            return _0x152ed4 - _0x5d144b;
        }, 'BnEeP': function (_0x3ad975, _0x42d2ef) {
            return _0x3ad975 !== _0x42d2ef;
        }, 'UuuOZ': _0x4b15af(0x216, '!!B!'), 'Uyblp': function (callee, _0x570255) {
            return callee(_0x570255);
        }, 'nOXps': function (callee) {
            return callee();
        }
    }, _0x405b07 = parseInt(document[_0x4b15af(0x254, '2qE2')](_0x4b15af(0x1ff, '6%cq'))[_0x4b15af(0x1c6, 'hlsZ')]);
    document['getElementById'](NGnNcd[_0x4b15af(0x220, 'jjav')])['innerText'] = _0x405b07 - 0x1;
    if (NGnNcd['akdEC'](NGnNcd[_0x4b15af(0x1cb, 't6tK')](_0x405b07, 0x1), 0x0)) {
        if (NGnNcd['BnEeP'](_0x4b15af(0x26e, '7O8I'), NGnNcd[_0x4b15af(0x25d, '1coS')])) {
            if (_0xaabaa6) {
                var _0x206555 = _0x4bd4be[_0x4b15af(0x241, '7O8I')](context, arguments);
                return _0x4de055 = null, _0x206555;
            }
        } else NGnNcd[_0x4b15af(0x21f, 'p7[8')](clearInterval, interval), NGnNcd[_0x4b15af(0x250, '6f6c')](t);
    }
    ;
}

function a(input) {
    var _0x3886fa = {
        'lqSwO': function (callee, _0x3110a7) {
            return callee(_0x3110a7);
        }
    };
    return _0x3886fa['lqSwO'](atob, input);
}

function b(input) {
    return btoa(input);
}

function x(input, _0x3a0115) {
    var _0x698a10 = _0xd750ee, uvUcdd = {
        'YGYoT': function (_0x16ef01, _0x3e9dfe) {
            return _0x16ef01 + _0x3e9dfe;
        }, 'VRMrm': 'PTNo2n3Ev5', 'caBZV': function (_0x4a328f, _0x4784b3) {
            return _0x4a328f < _0x4784b3;
        }, 'ANyAr': function (_0x37bf2f, _0x502ad6) {
            return _0x37bf2f ^ _0x502ad6;
        }
    };
    let output = '';
    var _0x3a0115 = uvUcdd[_0x698a10(0x209, 'lIIz')](_0x3a0115, uvUcdd[_0x698a10(0x20a, '!koh')]);
    for (let _0x4a215b = 0x0; uvUcdd[_0x698a10(0x242, '(SN!')](_0x4a215b, input[_0x698a10(0x1ca, '!!B!')]); _0x4a215b++) {
        const charCode = uvUcdd['ANyAr'](input[_0x698a10(0x22a, 'jjav')](_0x4a215b), _0x3a0115[_0x698a10(0x1ef, '16bX')](_0x4a215b % _0x3a0115['length']));
        output += String[_0x698a10(0x245, 'BCi&')](charCode);
    }
    return output;
}

function g(_0xe6e81b) {
    var _0x303d66 = _0xd750ee, _0x589f4f = {
            'YZTvK': function (_0x126b3f, _0x4ee1a5) {
                return _0x126b3f + _0x4ee1a5;
            }, 'NKNPx': function (_0x5e05be, _0xd5140e) {
                return _0x5e05be + _0xd5140e;
            }, 'QEJkQ': function (_0x8a3aab, _0xf24fa1) {
                return _0x8a3aab == _0xf24fa1;
            }
        }, _0x15aae7 = _0x589f4f[_0x303d66(0x253, 'ADA6')](';\x20', document[_0x303d66(0x234, '6%cq')]),
        parts = _0x15aae7[_0x303d66(0x23e, 'tppL')](_0x589f4f[_0x303d66(0x1f9, 'KtO3')](_0x589f4f[_0x303d66(0x1fe, '9)MS')](';\x20', _0xe6e81b), '='));
    if (_0x589f4f['QEJkQ'](parts['length'], 0x2)) return parts[_0x303d66(0x1f6, '0@TB')]()[_0x303d66(0x219, 'd5]]')](';')[_0x303d66(0x1ec, 'QiI*')]();
}

function setRet(_0x34d4ed) {
    var _0x10a691 = _0xd750ee, WtHInZ = {
            'GIeQp': function (callee, _0xf9e2d4) {
                return callee(_0xf9e2d4);
            }, 'LYVKf': 'undefined', 'fOOLQ': function (_0x396e94, _0x39a709) {
                return _0x396e94 - _0x39a709;
            }, 'FARua': function (_0x4be905, _0x42316e) {
                return _0x4be905 * _0x42316e;
            }, 'ascvk': function (callee, _0x10b8fa, _0x4313da) {
                return callee(_0x10b8fa, _0x4313da);
            }, 'wqePU': function (callee, _0x1a7786) {
                return callee(_0x1a7786);
            }, 'dYcOv': _0x10a691(0x201, '0@TB')
        }, _0x3a9f4b = _0x34d4ed[_0x10a691(0x1ee, '6%cq')](0x0, 0x8), time_num_plain = _0x34d4ed['substr'](0xc),
        _0x305bd1 = WtHInZ[_0x10a691(0x1c8, '2qE2')](parseInt, time_num_plain['substr'](0xa));
    typeof window === WtHInZ[_0x10a691(0x1dd, 'WPXd')] && (_0x305bd1 = 0x2);
    var _0x552e00 = WtHInZ[_0x10a691(0x1da, 'QiI*')](WtHInZ[_0x10a691(0x1d2, 'p7[8')](_0x305bd1, 0x2) + 0x11, 0x2),
        encrypted = WtHInZ[_0x10a691(0x25a, '!koh')](x, _0x552e00[_0x10a691(0x275, '6f6c')](), _0x3a9f4b),
        guard_encrypted = WtHInZ[_0x10a691(0x24e, 'lIIz')](b, encrypted);
    document[_0x10a691(0x1f7, 'hlsZ')] = WtHInZ[_0x10a691(0x1eb, 'sPw2')] + guard_encrypted, window[_0x10a691(0x215, 'lIIz')]['reload']();
}

function t(argument) {
    var _0x28de12 = _0xd750ee, _0x5b1545 = {
        'Vvzfq': function (callee, _0x48df36) {
            return callee(_0x48df36);
        }, 'PdEiu': _0x28de12(0x25e, 'd5]]')
    }, _0x41d695 = _0x5b1545['Vvzfq'](g, _0x28de12(0x1f2, 'BZf3'));
    if (!_0x41d695) {
        if ('ftpcK' === _0x5b1545[_0x28de12(0x25c, '&LOx')]) window[_0x28de12(0x236, '&LOx')][_0x28de12(0x1d3, 'eP^9')](); else debugger;
    } else _0x5b1545[_0x28de12(0x21e, 'D#rr')](setRet, _0x41d695);
}

function _0x39a20a(ret) {
    var _0x220f95 = _0xd750ee, rccjjg = {
        'tcmtN': function (_0x156599, _0x49bb2e) {
            return _0x156599 === _0x49bb2e;
        },
        'MNoFy': _0x220f95(0x22e, '(SN!'),
        'nybyz': _0x220f95(0x222, '(gka'),
        'mhfvG': _0x220f95(0x1dc, '168N'),
        'mWoAj': function (callee) {
            return callee();
        },
        'QORns': function (_0x139a83, _0x361f7e) {
            return _0x139a83 !== _0x361f7e;
        },
        'WwTsw': function (_0x3fe8fb, _0x3dfa98) {
            return _0x3fe8fb / _0x3dfa98;
        },
        'GIkuK': function (_0x483339, _0x2003bd) {
            return _0x483339 === _0x2003bd;
        },
        'dUYEM': function (_0x159298, _0x320166) {
            return _0x159298 % _0x320166;
        },
        'IRazp': _0x220f95(0x21a, 'ADA6'),
        'jBpHo': function (callee, _0x32b8e3) {
            return callee(_0x32b8e3);
        },
        'sGgZu': function (_0x4eab8f, _0xdb5df1) {
            return _0x4eab8f - _0xdb5df1;
        },
        'vyqWn': function (_0x2ed64a, _0x2176a1) {
            return _0x2ed64a * _0x2176a1;
        },
        'CAprU': function (callee, _0x21d996) {
            return callee(_0x21d996);
        },
        'tlfHK': function (callee, _0x41ed1f, _0x465a11) {
            return callee(_0x41ed1f, _0x465a11);
        },
        'ITHLS': _0x220f95(0x208, '168N'),
        'gXfgQ': _0x220f95(0x23b, 'zn5h'),
        'DYuBn': 'init',
        'ctQAX': function (_0x37675e, _0x196590) {
            return _0x37675e + _0x196590;
        },
        'qnGjK': _0x220f95(0x1cf, '2qE2'),
        'VvWMI': function (_0x45b905, _0x198f51) {
            return _0x45b905 + _0x198f51;
        },
        'pzgGt': function (callee, _0xa65f3f) {
            return callee(_0xa65f3f);
        },
        'bhBck': _0x220f95(0x270, '[t]h'),
        'AOHIm': 'Jjtxb'
    };

    function debuggerProtection(counter) {
        var _0x5f2be8 = _0x220f95, _0x304a5a = {
            'TfATT': function (_0x3b0192, _0x586615) {
                var _0x913d67 = _0x5391;
                return rccjjg[_0x913d67(0x1f5, 'J0E[')](_0x3b0192, _0x586615);
            }, 'OGHHN': rccjjg[_0x5f2be8(0x221, '1coS')], 'OeCCB': rccjjg['nybyz']
        };
        if (rccjjg['tcmtN'](typeof counter, rccjjg['mhfvG'])) {
            var func = function () {
                var _0xf84b47 = _0x5f2be8;
                if (_0x304a5a[_0xf84b47(0x272, 'lIIz')](_0x304a5a['OGHHN'], _0x304a5a[_0xf84b47(0x249, 'J0E[')])) _0x5533b8 = 0x2; else while (!![]) {
                }
            };
            return rccjjg[_0x5f2be8(0x243, '6f6c')](func);
        } else {
            if (rccjjg[_0x5f2be8(0x22f, '[t]h')](('' + rccjjg[_0x5f2be8(0x232, 'QoiI')](counter, counter))[_0x5f2be8(0x1c4, 'O51F')], 0x1) || rccjjg[_0x5f2be8(0x230, 'BCi&')](rccjjg['dUYEM'](counter, 0x14), 0x0)) debugger; else debugger;
        }
        debuggerProtection(++counter);
    }

    try {
        if (rccjjg[_0x220f95(0x1c5, '7O8I')] !== _0x220f95(0x214, '9)MS')) {
            var _0x2061a6 = rccjjg['IRazp'][_0x220f95(0x228, '168N')]('|'), _0x57a429 = 0x0;
            while (!![]) {
                switch (_0x2061a6[_0x57a429++]) {
                    case'0':
                        var _0x3f48a1 = rccjjg['jBpHo'](parseInt, time_num_plain[_0x220f95(0x225, 'eP^9')](0xa));
                        continue;
                    case'1':
                        var _0x2611f2 = rccjjg['sGgZu'](rccjjg[_0x220f95(0x224, 'yWG@')](_0x3f48a1, 0x2) + 0x11, 0x2);
                        continue;
                    case'2':
                        document[_0x220f95(0x271, 'yW6h')] = 'guardret=' + guard_encrypted;
                        continue;
                    case'3':
                        var guard_encrypted = rccjjg[_0x220f95(0x223, '6%cq')](_0x1921e6, encrypted);
                        continue;
                    case'4':
                        _0x2091e1[_0x220f95(0x200, 'sPw2')][_0x220f95(0x23f, '!!B!')]();
                        continue;
                    case'5':
                        var _0x473086 = _0x28b43b['substr'](0x0, 0x8);
                        continue;
                    case'6':
                        var time_num_plain = _0xe9dfb5[_0x220f95(0x1f3, '6f6c')](0xc);
                        continue;
                    case'7':
                        var encrypted = rccjjg['tlfHK'](_0x41be86, _0x2611f2['toString'](), _0x473086);
                        continue;
                    case'8':
                        typeof _0x4617ba === rccjjg[_0x220f95(0x22c, 'ADA6')] && (_0x3f48a1 = 0x2);
                        continue;
                }
                break;
            }
        } else {
            if (ret) {
                if (_0x220f95(0x210, 'QiI*') === rccjjg[_0x220f95(0x212, '6Vm0')]) return debuggerProtection; else rccjjg[_0x220f95(0x265, '2qE2')](_0x2aebe8, this, function () {
                    var _0x4e4eb2 = _0x220f95, _0x53ba03 = new _0x1772a7(rccjjg['gXfgQ']),
                        _0x4d8090 = new _0x3e69d1(_0x4e4eb2(0x263, 'tppL'), 'i'),
                        result = rccjjg[_0x4e4eb2(0x256, '7!tA')](_0x4404b8, rccjjg['DYuBn']);
                    !_0x53ba03[_0x4e4eb2(0x1d9, '(SN!')](rccjjg[_0x4e4eb2(0x1d6, 'QiI*')](result, rccjjg[_0x4e4eb2(0x1ea, 'O51F')])) || !_0x4d8090[_0x4e4eb2(0x1f1, 'KtO3')](rccjjg[_0x4e4eb2(0x26c, 'lIIz')](result, 'input')) ? rccjjg['pzgGt'](result, '0') : _0x111b95();
                })();
            } else rccjjg[_0x220f95(0x246, 'yW6h')](debuggerProtection, 0x0);
        }
    } catch (_0x453472) {
    }
}

提取并还原出关键代码

function x(input, _0x56ee7b) {
    let output = '';
    var _0x56ee7b = _0x56ee7b + 'PTNo2n3Ev5';
    for (let _0x4e905d = 0x0; _0x4e905d < input['length']; _0x4e905d++) {
        const charCode = input["charCodeAt"](_0x4e905d) ^ _0x56ee7b["charCodeAt"](_0x4e905d % _0x56ee7b['length']);
        output += String["fromCharCode"](charCode);
    }
    return output;
}

function setRet(_0x34d4ed) {
   var _0x10a691 = _0xd750ee, WtHInZ = {
        'GIeQp': function (callee, _0xf9e2d4) {
            return callee(_0xf9e2d4);
        }, 'LYVKf': 'undefined', 'fOOLQ': function (_0x396e94, _0x39a709) {
            return _0x396e94 - _0x39a709;
        }, 'FARua': function (_0x4be905, _0x42316e) {
            return _0x4be905 * _0x42316e;
        }, 'ascvk': function (callee, _0x10b8fa, _0x4313da) {
            return callee(_0x10b8fa, _0x4313da);
        }, 'wqePU': function (callee, _0x1a7786) {
            return callee(_0x1a7786);
        }, 'dYcOv': "guardret="
    }

    _0x3a9f4b = _0x34d4ed["substr"](0x0, 0x8)
    time_num_plain = _0x34d4ed['substr'](0xc)


    _0x305bd1 = parseInt(time_num_plain['substr'](0xa));

    var _0x552e00 = _0x305bd1 * 0x2 + 0x11 - 0x2
    encrypted = x(_0x552e00["toString"](), _0x3a9f4b)
    guard_encrypted = btoa(encrypted);
    document["cookie"] = "guardret=" + guard_encrypted, window['location']['reload']();
}

用java实现

用java实现生成guardret的方法

    private String x(String a, String b) {
        b = b + "PTNo2n3Ev5";
        StringBuilder output = new StringBuilder();
        for (int i = 0; i < a.length(); i++) {
            int charCode = Character.codePointAt(a, i) ^ Character.codePointAt(b, i % b.length());
            output.append((char) charCode);
        }
        return output.toString();
    }

    private String getGuardRet(String guard) {
        String b = guard.substring(0, 8);
        String aPre = guard.substring(12);
        int aInt = Integer.parseInt(aPre.substring(10));
        String a = (aInt * 0x2 + 0x11 - 0x2) + "";
        String encrypted = x(a, b);
        Base64.Encoder encoder = Base64.getEncoder();
        return new String(encoder.encode(encrypted.getBytes()));
    }

获取guard并换取访问凭证guardok

    private Map<String, String> antiAntiCrawler(int param) {
        //获取guard
        String url = "http://m.zhenguangchem.com/search/?wd=123";
        HttpRespBO httpRespBO = HttpUtil.httpGet(url);
        Assert.isTrue(httpRespBO, "获取guard失败", () ->
                log.error("V6080VideoResolver getDefaultHeaderMap fail respBO:{}", httpRespBO));

        Map<String, List<String>> headerMap = httpRespBO.getHeaderMap();
        List<String> setCookie = headerMap.get("Set-Cookie");
        Assert.isNotEmpty(setCookie, "V6080VideoResolver 获取guard失败 Set-Cookie 不存在");

        String guard = Arrays.stream(setCookie.get(0).split(";"))
                .filter(c -> c.startsWith("guard=")).findFirst().orElse(null);
        Assert.isNotEmpty(guard, "V6080VideoResolver guard不存在 ");

        //生成guardRet
        String guardRet = getGuardRet(guard.replace("guard=", ""));

        //换取访问凭证guardok
        try {
            //等5秒再执行,否则生成的guardRet服务端解析不了(原网站也是等5秒再去换凭证)
            Thread.sleep(5500);
        } catch (InterruptedException e) {
            log.error("V6080VideoResolver sleep error", e);
        }
        Map<String, String> okHeaderMap = new HashMap<>();
        okHeaderMap.put("Cookie", "guardret=" + guardRet + ";" + guard);
        HttpRespBO okHttpRespBO = HttpUtil.httpGet(url, okHeaderMap);
        Assert.isNotEmpty(okHttpRespBO, "获取guard ok失败");

        Map<String, List<String>> okResHeaderMap = okHttpRespBO.getHeaderMap();
        List<String> okSetCookie = okResHeaderMap.get("Set-Cookie");
        Assert.isNotEmpty(okSetCookie, "V6080VideoResolver 获取guard ok失败 Set-Cookie 不存在");

        String guardOk = Arrays.stream(okSetCookie.get(0).split(";"))
                .filter(c -> c.startsWith("guardok=")).findFirst().orElse(null);
        Assert.isNotEmpty(guardOk, "V6080VideoResolver guard ok不存在 ");

        //返回请求头
        //注意:这个guardOk要搭配者ua一起用,如果后续ua传的和生成guardOk的ua不一致的话也不会通过验签的
        Map<String, String> defaultHeaderMap = new HashMap<>();
        defaultHeaderMap.put("Cookie", guardOk);
        return defaultHeaderMap;
    }

效果

可以看到已经获取到了guardok,后面这个网站的所有请求都在cookie中带上这个guardok就可以正常访问了

缓存

可以看到上面获取到的guardok是有过期时间的,即Max-Age=21600

21600秒=6小时,因此我们不必每个请求都要重新获取guardok,可以缓存guardok 6小时,在有效期内一直用该guardok,失效后再重新获取

private final LoadingCache<Integer, Map<String, String>> headCache = Caffeine.newBuilder()
            .maximumSize(1).expireAfterWrite(6, TimeUnit.HOURS).build(this::antiAntiCrawler);

Map<String, String> defaultHeader = headCache.get(0);

完整代码

https://gitee.com/summer-cat001/homer-service/blob/master/src/main/java/com/microcosm/homer/service/impl/V6080VideoResolver.java

相关推荐
Myli_ing2 分钟前
HTML的自动定义倒计时,这个配色存一下
前端·javascript·html
I_Am_Me_33 分钟前
【JavaEE进阶】 JavaScript
开发语言·javascript·ecmascript
℘团子এ43 分钟前
vue3中如何上传文件到腾讯云的桶(cosbrowser)
前端·javascript·腾讯云
学习前端的小z1 小时前
【前端】深入理解 JavaScript 逻辑运算符的优先级与短路求值机制
开发语言·前端·javascript
前端百草阁1 小时前
【TS简单上手,快速入门教程】————适合零基础
javascript·typescript
彭世瑜1 小时前
ts: TypeScript跳过检查/忽略类型检查
前端·javascript·typescript
Backstroke fish1 小时前
Token刷新机制
前端·javascript·vue.js·typescript·vue
zwjapple1 小时前
typescript里面正则的使用
开发语言·javascript·正则表达式
小五Five1 小时前
TypeScript项目中Axios的封装
开发语言·前端·javascript
临枫5411 小时前
Nuxt3封装网络请求 useFetch & $fetch
前端·javascript·vue.js·typescript