From 56ac7c536229801f2f3ab3d2c237288eb6ba50b4 Mon Sep 17 00:00:00 2001 From: Wx-2025 <351320169@qq.com> Date: Fri, 21 Nov 2025 00:14:07 +0800 Subject: [PATCH] Update auth.js --- utils/auth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/auth.js b/utils/auth.js index c5380e2..99085a9 100644 --- a/utils/auth.js +++ b/utils/auth.js @@ -1 +1 @@ -const _0x530cc9=_0x3dbd;(function(_0x507895,_0x16c4c4){const _0x5a66be=_0x3dbd,_0x4708fe=_0x507895();while(!![]){try{const _0x3c6285=parseInt(_0x5a66be(0x12d))/0x1*(-parseInt(_0x5a66be(0x135))/0x2)+parseInt(_0x5a66be(0x13a))/0x3+parseInt(_0x5a66be(0x106))/0x4*(parseInt(_0x5a66be(0x11f))/0x5)+parseInt(_0x5a66be(0x100))/0x6*(parseInt(_0x5a66be(0x121))/0x7)+parseInt(_0x5a66be(0x131))/0x8*(-parseInt(_0x5a66be(0x105))/0x9)+parseInt(_0x5a66be(0x13c))/0xa*(-parseInt(_0x5a66be(0x10d))/0xb)+parseInt(_0x5a66be(0x118))/0xc;if(_0x3c6285===_0x16c4c4)break;else _0x4708fe['push'](_0x4708fe['shift']());}catch(_0x5f2ebd){_0x4708fe['push'](_0x4708fe['shift']());}}}(_0x26b5,0x39b51));import{extension_settings}from'/scripts/extensions.js';import{saveSettings,extensionName}from'./settings.js';import{updateUI}from'../ui/state.js';export const pluginAuthStatus={'authorized':![],'expired':![]};function _0x3dbd(_0x515e61,_0x17f2b3){const _0x26b58c=_0x26b5();return _0x3dbd=function(_0x3dbd65,_0x397591){_0x3dbd65=_0x3dbd65-0xfd;let _0x19d677=_0x26b58c[_0x3dbd65];return _0x19d677;},_0x3dbd(_0x515e61,_0x17f2b3);}function _0x26b5(){const _0x20bcaa=['plugin_valid_until','[Amily2号]\x20授权有效期检查:\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20当前时间:\x20','11YoCGbx','getFullYear','#auth_panel','天\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20有效期至:\x20','expired','charAt','\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20','\x20授权已过期','plugin_activated','2025-12-31','expiryDate','5874780UdJkgv','ceil','授权激活成功!','join','\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20授权有效期:\x20','seed','getDate','55UMisnh','true','76118RRrpcl','-AMILY_','','plugin_auto_login','log','Amily2号启用','授权已过期','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20授权有效期至:\x20','ABCDEFGHJKLMNPQRSTUVWXYZ23456789','success','authorized','[Amily2号]\x20密码有效期为:\x20','16831hFewMI','setItem','removeItem','getItem','12520SMRIPl','setDate','push','abs','8TxnJBL','plugin_auth_code','天内将自动登录。','toISOString','toLocaleDateString','397122IQcvOu','授权码无效','3666800FpflhM','.plugin-features','slideDown','charCodeAt','enabled','validityDays','186ORnkfq','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20是否在有效期内:\x20','激活失败','getMonth','2007AoGMhp','21940fqiERz','error','slideUp','[Amily2号]\x20密码匹配:\x20','\x20对应第'];_0x26b5=function(){return _0x20bcaa;};return _0x26b5();}const PASSWORD_VALIDITY_DAYS=0x7,AUTH_CONFIG={'expiryDate':new Date(_0x530cc9(0x116)),'validityDays':PASSWORD_VALIDITY_DAYS};console[_0x530cc9(0x125)](_0x530cc9(0x12c)+PASSWORD_VALIDITY_DAYS+'天');function generateDynamicPassword(_0x186fb0=new Date()){const _0x4ca3eb=_0x530cc9,_0x52703f={'a':0x41c64e6d,'c':0x3039,'m':0x7fffffff};function _0x19f426(_0x23ee6e){const _0xf4f987=_0x3dbd;let _0x55de8a=0x0;for(let _0x2015a4=0x0;_0x2015a4<_0x23ee6e['length'];_0x2015a4++){_0x55de8a=(_0x55de8a<<0x5)-_0x55de8a+_0x23ee6e[_0xf4f987(0xfd)](_0x2015a4),_0x55de8a|=0x0;}return _0x55de8a>>>0x0;}const _0x408939=_0x186fb0[_0x4ca3eb(0x104)]()+0x1,_0x56662c=_0x186fb0[_0x4ca3eb(0x11e)](),_0x2ffe75=_0x186fb0[_0x4ca3eb(0x10e)](),_0xd90ad=_0x408939+'-'+_0x56662c+_0x4ca3eb(0x122)+_0x2ffe75,_0x3093da='SD'+_0x19f426(_0xd90ad),_0x10fd3d='V'+_0x19f426(_0x3093da);function _0x9f83b0(_0x48d15e){return function(){const _0xb7491=_0x3dbd;return _0x48d15e[_0xb7491(0x11d)]=(_0x48d15e['a']*_0x48d15e[_0xb7491(0x11d)]+_0x48d15e['c'])%_0x48d15e['m'],_0x48d15e[_0xb7491(0x11d)];};}const _0x547686=_0x19f426(_0x10fd3d)%_0x52703f['m'],_0x14444b=_0x9f83b0({..._0x52703f,'seed':_0x547686}),_0x1d8f0b=_0x4ca3eb(0x129),_0x506d35=[];for(let _0x9b885d=0x0;_0x9b885d<0x3;_0x9b885d++){let _0xf76108='';for(let _0x386496=0x0;_0x386496<0x4;_0x386496++){const _0x5dd9bd=Math[_0x4ca3eb(0x134)](_0x14444b());_0xf76108+=_0x1d8f0b[_0x4ca3eb(0x112)](_0x5dd9bd%_0x1d8f0b['length']);}_0x506d35[_0x4ca3eb(0x133)](_0xf76108);}return _0x506d35[_0x4ca3eb(0x11b)]('-');}export function getPasswordForDate(_0x2ea9dc=new Date()){return generateDynamicPassword(_0x2ea9dc);}export function checkAuthorization(){const _0x580f59=_0x530cc9,_0x560a46=new Date();pluginAuthStatus[_0x580f59(0x111)]=_0x560a46>AUTH_CONFIG[_0x580f59(0x117)];pluginAuthStatus[_0x580f59(0x111)]&&(localStorage[_0x580f59(0x12f)](_0x580f59(0x115)),localStorage['removeItem'](_0x580f59(0x136)),localStorage['removeItem']('plugin_valid_until'),console[_0x580f59(0x125)]('[Amily2号]\x20检测到授权过期,已清理本地存储。'));const _0x56e9f8=localStorage[_0x580f59(0x130)]('plugin_activated')===_0x580f59(0x120),_0x43b99a=localStorage['getItem'](_0x580f59(0x136)),_0x2b5ee2=localStorage[_0x580f59(0x130)](_0x580f59(0x10b));let _0x31a722=![];if(_0x2b5ee2){const _0x42585c=new Date(_0x2b5ee2);_0x31a722=_0x560a46<=_0x42585c,console['log'](_0x580f59(0x10c)+_0x560a46['toISOString']()+_0x580f59(0x128)+_0x42585c[_0x580f59(0x138)]()+_0x580f59(0x102)+_0x31a722);}let _0x544bf2=![];if(_0x43b99a){const _0x5246d8=new Date();for(let _0x22b57b=0x0;_0x22b57bAUTH_CONFIG[_0x3824a5(0x117)])return toastr[_0x3824a5(0x107)](_0x3824a5(0x127),_0x3824a5(0x103)),![];const _0x34b6e8=new Date();return _0x34b6e8[_0x3824a5(0x132)](_0x228bc2[_0x3824a5(0x11e)]()+AUTH_CONFIG[_0x3824a5(0xff)]),localStorage[_0x3824a5(0x12e)](_0x3824a5(0x10b),_0x34b6e8['toISOString']()),localStorage[_0x3824a5(0x12e)](_0x3824a5(0x136),_0x34c691),localStorage[_0x3824a5(0x12e)](_0x3824a5(0x115),'true'),localStorage['setItem'](_0x3824a5(0x124),'true'),toastr[_0x3824a5(0x12a)](_0x3824a5(0x11a)+AUTH_CONFIG[_0x3824a5(0xff)]+_0x3824a5(0x137),_0x3824a5(0x126)),pluginAuthStatus[_0x3824a5(0x12b)]=!![],$(_0x3824a5(0x10f))[_0x3824a5(0x108)](0x190,function(){const _0x580c69=_0x3824a5;$(_0x580c69(0x13d))[_0x580c69(0x13e)](0x190),updateUI();}),extension_settings[extensionName][_0x3824a5(0xfe)]=!![],saveSettings(),!![];}export function displayExpiryInfo(){const _0xdb2fc8=_0x530cc9,_0x34bd1f=new Date(),_0x297f71=Math[_0xdb2fc8(0x119)]((AUTH_CONFIG[_0xdb2fc8(0x117)]-_0x34bd1f)/(0x3e8*0x3c*0x3c*0x18)),_0x324d66=localStorage[_0xdb2fc8(0x130)]('plugin_valid_until');if(pluginAuthStatus['expired'])return _0xdb2fc8(0x114);else{let _0x44dff3='';if(_0x324d66){const _0x561f12=new Date(_0x324d66);_0x44dff3='当前授权有效期至:\x20'+_0x561f12[_0xdb2fc8(0x139)]()+_0xdb2fc8(0x123);}return _0xdb2fc8(0x11c)+_0x297f71+_0xdb2fc8(0x110)+AUTH_CONFIG[_0xdb2fc8(0x117)]['toLocaleDateString']()+_0xdb2fc8(0x101)+_0x44dff3+_0xdb2fc8(0x113);}} \ No newline at end of file +const _0x512633=_0x2c07;(function(_0x38de7f,_0x58e628){const _0x242fae=_0x2c07,_0x726b89=_0x38de7f();while(!![]){try{const _0x83b47d=-parseInt(_0x242fae(0x151))/0x1+parseInt(_0x242fae(0x130))/0x2*(parseInt(_0x242fae(0x153))/0x3)+-parseInt(_0x242fae(0x148))/0x4*(-parseInt(_0x242fae(0x13c))/0x5)+-parseInt(_0x242fae(0x12e))/0x6*(parseInt(_0x242fae(0x140))/0x7)+-parseInt(_0x242fae(0x14b))/0x8+parseInt(_0x242fae(0x141))/0x9+parseInt(_0x242fae(0x152))/0xa;if(_0x83b47d===_0x58e628)break;else _0x726b89['push'](_0x726b89['shift']());}catch(_0x19238c){_0x726b89['push'](_0x726b89['shift']());}}}(_0x31eb,0xbb13d));import{extension_settings}from'/scripts/extensions.js';function _0x31eb(){const _0x205107=['authorized','9824200mkdDpy','服务器验证连接失败,尝试本地验证...','setDate','当前授权有效期至:\x20','toLocaleDateString','POST','328661hYuqxU','12482190jSbKZQ','3806637cdKNyS','expiryDate','getDate','plugin_valid_until','每日授权激活成功!有效期至:\x20','ceil','getFullYear','log','','removeItem','enabled','stringify','26622lWPioR','plugin_activated','2NXXmmS','json','toISOString','expired','true','setItem','天\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20有效期至:\x20','授权码无效或服务器连接失败','application/json','plugin_auth_code','2025-12-31','getItem','25WoFFjZ','plugin_auto_login','success','http://accdn.silencelurker.xyz:2086','2296IuuMiR','1143882LldiPm','padStart','error','plugin_user_type','Amily-','激活失败','授权激活成功!用户类型:\x20','907276yfOcAB','slideUp'];_0x31eb=function(){return _0x205107;};return _0x31eb();}import{saveSettings,extensionName}from'./settings.js';import{updateUI}from'../ui/state.js';export const pluginAuthStatus={'authorized':![],'expired':![]};const SERVER_URL=_0x512633(0x13f),AUTH_CONFIG={'expiryDate':new Date(_0x512633(0x13a))};export function getPasswordForDate(_0x117972){const _0x52661f=_0x512633,_0x70bc0d=_0x117972[_0x52661f(0x159)](),_0x45b6a1=String(_0x117972['getMonth']()+0x1)[_0x52661f(0x142)](0x2,'0'),_0x2206ce=String(_0x117972[_0x52661f(0x155)]())[_0x52661f(0x142)](0x2,'0');return _0x52661f(0x145)+_0x70bc0d+_0x45b6a1+_0x2206ce;}function _0x2c07(_0x2c9f6e,_0x501a5a){const _0x31eb16=_0x31eb();return _0x2c07=function(_0x2c0711,_0x3bc7ad){_0x2c0711=_0x2c0711-0x12c;let _0x20bafe=_0x31eb16[_0x2c0711];return _0x20bafe;},_0x2c07(_0x2c9f6e,_0x501a5a);}export function checkAuthorization(){const _0x338a87=_0x512633,_0x6ea34f=new Date(),_0x218c05=localStorage['getItem']('plugin_valid_until');if(_0x218c05){const _0x4330a4=new Date(_0x218c05);_0x6ea34f>_0x4330a4?pluginAuthStatus[_0x338a87(0x133)]=!![]:pluginAuthStatus[_0x338a87(0x133)]=![];}else pluginAuthStatus['expired']=_0x6ea34f>AUTH_CONFIG[_0x338a87(0x154)];pluginAuthStatus[_0x338a87(0x133)]&&(localStorage[_0x338a87(0x15c)](_0x338a87(0x12f)),localStorage['removeItem'](_0x338a87(0x139)),localStorage[_0x338a87(0x15c)](_0x338a87(0x144)),localStorage[_0x338a87(0x15c)](_0x338a87(0x156)),console[_0x338a87(0x15a)]('[Amily2号]\x20检测到授权已过期,已清理本地存储。'));const _0x495903=localStorage[_0x338a87(0x13b)](_0x338a87(0x12f))===_0x338a87(0x134);return pluginAuthStatus[_0x338a87(0x14a)]=_0x495903&&!pluginAuthStatus[_0x338a87(0x133)],pluginAuthStatus[_0x338a87(0x14a)];}export async function activatePluginAuthorization(_0x529320){const _0x398aff=_0x512633;try{const _0x18b86b=await fetch(SERVER_URL+'/verify',{'method':_0x398aff(0x150),'headers':{'Content-Type':_0x398aff(0x138)},'body':JSON[_0x398aff(0x12d)]({'code':_0x529320})}),_0x39e943=await _0x18b86b[_0x398aff(0x131)]();if(_0x39e943['success'])return localStorage[_0x398aff(0x135)]('plugin_auth_code',_0x529320),localStorage['setItem'](_0x398aff(0x12f),_0x398aff(0x134)),localStorage[_0x398aff(0x135)](_0x398aff(0x13d),'true'),localStorage['setItem'](_0x398aff(0x144),_0x39e943['type']),localStorage[_0x398aff(0x15c)](_0x398aff(0x156)),toastr[_0x398aff(0x13e)](_0x398aff(0x147)+_0x39e943['type'],'Amily2号启用'),pluginAuthStatus['authorized']=!![],enablePluginUI(),!![];}catch(_0x169c8c){console['warn'](_0x398aff(0x14c),_0x169c8c);}const _0x43ffc9=getPasswordForDate(new Date());if(_0x529320===_0x43ffc9){const _0x92650e=new Date();return _0x92650e[_0x398aff(0x14d)](_0x92650e[_0x398aff(0x155)]()+0x7),localStorage[_0x398aff(0x135)](_0x398aff(0x139),_0x529320),localStorage['setItem'](_0x398aff(0x12f),_0x398aff(0x134)),localStorage['setItem'](_0x398aff(0x13d),_0x398aff(0x134)),localStorage[_0x398aff(0x135)]('plugin_user_type','1'),localStorage[_0x398aff(0x135)](_0x398aff(0x156),_0x92650e[_0x398aff(0x132)]()),toastr[_0x398aff(0x13e)](_0x398aff(0x157)+_0x92650e[_0x398aff(0x14f)](),'Amily2号启用'),pluginAuthStatus['authorized']=!![],enablePluginUI(),!![];}return toastr[_0x398aff(0x143)](_0x398aff(0x137),_0x398aff(0x146)),![];}function enablePluginUI(){const _0x524dfa=_0x512633;$('#auth_panel')[_0x524dfa(0x149)](0x190,function(){$('.plugin-features')['slideDown'](0x190),updateUI();}),extension_settings[extensionName][_0x524dfa(0x12c)]=!![],saveSettings();}export function displayExpiryInfo(){const _0x4551f3=_0x512633,_0x3541a5=new Date(),_0x589d2e=Math[_0x4551f3(0x158)]((AUTH_CONFIG['expiryDate']-_0x3541a5)/(0x3e8*0x3c*0x3c*0x18)),_0x2279a4=localStorage[_0x4551f3(0x13b)](_0x4551f3(0x156));if(pluginAuthStatus[_0x4551f3(0x133)])return'\x20授权已过期';else{let _0x5c3abd='';if(_0x2279a4){const _0x9ba980=new Date(_0x2279a4);_0x5c3abd=_0x4551f3(0x14e)+_0x9ba980[_0x4551f3(0x14f)]()+_0x4551f3(0x15b);}return'\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20授权有效期:\x20'+_0x589d2e+_0x4551f3(0x136)+AUTH_CONFIG[_0x4551f3(0x154)][_0x4551f3(0x14f)]()+'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5c3abd+'\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20';}}