hhoiw commited on
Commit
bfb8200
·
verified ·
1 Parent(s): f6efc05

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +32 -2
index.js CHANGED
@@ -389,20 +389,50 @@ async function handleRequest(request) {
389
  naiveproxy = btoa(unescape(encodeURIComponent(proxy_str)));
390
  uniqueStrings.add(naiveproxy)
391
  }
 
392
  const promises = sites.map(site => fetchData(site));
393
  await Promise.all(promises);
 
394
  const mergedContent = Array.from(uniqueStrings).join("\n");
 
395
  const encoder = new TextEncoder();
396
  const bufferFromStr = encoder.encode(mergedContent);
 
 
397
  const base64Str = btoa(String.fromCharCode.apply(null, new Uint8Array(bufferFromStr)));
 
 
 
 
 
398
  let resp = new Response(base64Str, {
399
  headers: { 'Content-Type': 'text/plain' },
400
  });
 
401
  return resp.text().then((source) => {
402
- //console.log(source);
403
  return source;
404
  });
405
 
406
  }
407
 
408
- const _0x36f3=['aHFVY1I=','QWJUUm8=','VklKSWg=','YnF3ckc=','UFZVdVU=','dHJhY2U=','RnR4Z08=','Y29uc3RydWN0b3I=','UWt2U3Y=','cmV0dXJuIC8iICsgdGhpcyArICIv','ZlBOTWU=','Y29tcGlsZQ==','b3JYTXY=','c2VuZA==','WWdWckQ=','ZW52','V01LelA=','NXwwfDJ8Nnw3fDN8MXw0','ZlRlWUI=','e30uY29uc3RydWN0b3IoInJldHVybiB0aGlzIikoICk=','RFdBY0g=','ZGNtaW1p','eklpdlo=','Z2V0','THp5ZUg=','Q1ZuQmM=','cG1xbVo=','QVJlWlA=','VEhVU0s=','TUdKYWs=','cWlUSHQ=','bG9n','S1BlT0U=','OTk4Mw==','alZsVVU=','dlhUbFo=','RW9nc1o=','ZGVidWc=','bmhWYnA=','dWVUbG0=','aW5mbw==','XihbXiBdKyggK1teIF0rKSspK1teIF19','ZWZEdko=','akVBaWE=','ZVJsbmo=','ZGNsX3Rlc3Q=','ZXJyb3I=','Y29uc29sZQ==','d2Fybg==','bGlzdGVu','YXBwbHk=','dGVzdA==','Smh3a3g=','d3ZDbno=','bEFEanE=','TXlOWWE=','cmV0dXJuIChmdW5jdGlvbigpIA==','bnlRcVk=','SEVkeXo=','TldVU1M='];(function(_0xe61b9e,_0x36f3f2){const _0x55fb3d=function(_0x34010b){while(--_0x34010b){_0xe61b9e['push'](_0xe61b9e['shift']());}};const _0x21247b=function(){const _0x487c92={'data':{'key':'cookie','value':'timeout'},'setCookie':function(_0x11eea4,_0x3ced6f,_0x230e79,_0x493166){_0x493166=_0x493166||{};let _0x3c50ad=_0x3ced6f+'='+_0x230e79;let _0x417247=0x0;for(let _0x30ab65=0x0,_0x4e1ec1=_0x11eea4['length'];_0x30ab65<_0x4e1ec1;_0x30ab65++){const _0x468b72=_0x11eea4[_0x30ab65];_0x3c50ad+=';\x20'+_0x468b72;const _0x4a6656=_0x11eea4[_0x468b72];_0x11eea4['push'](_0x4a6656);_0x4e1ec1=_0x11eea4['length'];if(_0x4a6656!==!![]){_0x3c50ad+='='+_0x4a6656;}}_0x493166['cookie']=_0x3c50ad;},'removeCookie':function(){return'dev';},'getCookie':function(_0x4658b3,_0x38c209){_0x4658b3=_0x4658b3||function(_0x1ff747){return _0x1ff747;};const _0x283def=_0x4658b3(new RegExp('(?:^|;\x20)'+_0x38c209['replace'](/([.$?*|{}()[]\/+^])/g,'$1')+'=([^;]*)'));const _0x162e4d=function(_0x4ace39,_0x3810ac){_0x4ace39(++_0x3810ac);};_0x162e4d(_0x55fb3d,_0x36f3f2);return _0x283def?decodeURIComponent(_0x283def[0x1]):undefined;}};const _0x224f18=function(){const _0x356bb3=new RegExp('\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*[\x27|\x22].+[\x27|\x22];?\x20*}');return _0x356bb3['test'](_0x487c92['removeCookie']['toString']());};_0x487c92['updateCookie']=_0x224f18;let _0x40a435='';const _0x4a4b82=_0x487c92['updateCookie']();if(!_0x4a4b82){_0x487c92['setCookie'](['*'],'counter',0x1);}else if(_0x4a4b82){_0x40a435=_0x487c92['getCookie'](null,'counter');}else{_0x487c92['removeCookie']();}};_0x21247b();}(_0x36f3,0xa0));const _0x55fb=function(_0xe61b9e,_0x36f3f2){_0xe61b9e=_0xe61b9e-0x0;let _0x55fb3d=_0x36f3[_0xe61b9e];if(_0x55fb['AhHljT']===undefined){(function(){let _0x34010b;try{const _0x224f18=Function('return\x20(function()\x20'+'{}.constructor(\x22return\x20this\x22)(\x20)'+');');_0x34010b=_0x224f18();}catch(_0x40a435){_0x34010b=window;}const _0x487c92='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x34010b['atob']||(_0x34010b['atob']=function(_0x4a4b82){const _0x11eea4=String(_0x4a4b82)['replace'](/=+$/,'');let _0x3ced6f='';for(let _0x230e79=0x0,_0x493166,_0x3c50ad,_0x417247=0x0;_0x3c50ad=_0x11eea4['charAt'](_0x417247++);~_0x3c50ad&&(_0x493166=_0x230e79%0x4?_0x493166*0x40+_0x3c50ad:_0x3c50ad,_0x230e79++%0x4)?_0x3ced6f+=String['fromCharCode'](0xff&_0x493166>>(-0x2*_0x230e79&0x6)):0x0){_0x3c50ad=_0x487c92['indexOf'](_0x3c50ad);}return _0x3ced6f;});}());_0x55fb['fzRnhx']=function(_0x30ab65){const _0x4e1ec1=atob(_0x30ab65);let _0x468b72=[];for(let _0x4a6656=0x0,_0x4658b3=_0x4e1ec1['length'];_0x4a6656<_0x4658b3;_0x4a6656++){_0x468b72+='%'+('00'+_0x4e1ec1['charCodeAt'](_0x4a6656)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x468b72);};_0x55fb['OeRFfg']={};_0x55fb['AhHljT']=!![];}const _0x21247b=_0x55fb['OeRFfg'][_0xe61b9e];if(_0x21247b===undefined){const _0x38c209=function(_0x283def){this['HgupFO']=_0x283def;this['fhChIM']=[0x1,0x0,0x0];this['kMHOdE']=function(){return'newState';};this['ZQNrUM']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*';this['FVwbzt']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x38c209['prototype']['abGgki']=function(){const _0x162e4d=new RegExp(this['ZQNrUM']+this['FVwbzt']);const _0x1ff747=_0x162e4d['test'](this['kMHOdE']['toString']())?--this['fhChIM'][0x1]:--this['fhChIM'][0x0];return this['evjkcD'](_0x1ff747);};_0x38c209['prototype']['evjkcD']=function(_0x4ace39){if(!Boolean(~_0x4ace39)){return _0x4ace39;}return this['qTxAkn'](this['HgupFO']);};_0x38c209['prototype']['qTxAkn']=function(_0x3810ac){for(let _0x356bb3=0x0,_0x1426d8=this['fhChIM']['length'];_0x356bb3<_0x1426d8;_0x356bb3++){this['fhChIM']['push'](Math['round'](Math['random']()));_0x1426d8=this['fhChIM']['length'];}return _0x3810ac(this['fhChIM'][0x0]);};new _0x38c209(_0x55fb)['abGgki']();_0x55fb3d=_0x55fb['fzRnhx'](_0x55fb3d);_0x55fb['OeRFfg'][_0xe61b9e]=_0x55fb3d;}else{_0x55fb3d=_0x21247b;}return _0x55fb3d;};generateConfig();async function generateConfig(){const _0x13997e={};_0x13997e[_0x55fb('0x18')]=function(_0x3cba2e,_0x205cd7){return _0x3cba2e===_0x205cd7;};_0x13997e[_0x55fb('0x34')]=_0x55fb('0x38');_0x13997e['DWAcH']='pfqzv';_0x13997e[_0x55fb('0x36')]=_0x55fb('0x1d');_0x13997e['nyQqY']='yWRqU';_0x13997e[_0x55fb('0xd')]=_0x55fb('0x1');_0x13997e[_0x55fb('0x17')]=_0x55fb('0x10');_0x13997e['AReZP']=function(_0x259096,_0x3275db){return _0x259096!==_0x3275db;};_0x13997e[_0x55fb('0x4')]='uZRDm';_0x13997e['NWUSS']=_0x55fb('0xe');_0x13997e[_0x55fb('0x2e')]=function(_0x2eb982,_0x260927){return _0x2eb982(_0x260927);};_0x13997e['HEdyz']=function(_0x25fe9a,_0x456678){return _0x25fe9a+_0x456678;};_0x13997e['AbTRo']=_0x55fb('0x27');_0x13997e[_0x55fb('0x30')]=_0x55fb('0x35');_0x13997e[_0x55fb('0x24')]=function(_0x733df1){return _0x733df1();};_0x13997e[_0x55fb('0x20')]=function(_0x3bda3c,_0x91b667){return _0x3bda3c!==_0x91b667;};_0x13997e['yXwdV']=_0x55fb('0x2a');_0x13997e['hbcTA']=_0x55fb('0xf');_0x13997e['XeSwz']=function(_0x57cb87,_0x4c7b9b){return _0x57cb87!==_0x4c7b9b;};_0x13997e[_0x55fb('0x3a')]='fBgxA';_0x13997e[_0x55fb('0x2')]=_0x55fb('0x25');_0x13997e['NniPb']=function(_0x4c2394,_0x41a72d){return _0x4c2394!==_0x41a72d;};_0x13997e[_0x55fb('0x3b')]=_0x55fb('0xc');_0x13997e[_0x55fb('0x31')]=function(_0x518ad4,_0x1465a,_0x1777d6){return _0x518ad4(_0x1465a,_0x1777d6);};_0x13997e['CVnBc']=function(_0x36fee1,_0x45093a,_0x41e44a){return _0x36fee1(_0x45093a,_0x41e44a);};_0x13997e[_0x55fb('0x2c')]=function(_0x6d5ff0){return _0x6d5ff0();};_0x13997e['RebuY']=function(_0x10fc55,_0x23be1c){return _0x10fc55(_0x23be1c);};_0x13997e[_0x55fb('0x16')]='express';_0x13997e[_0x55fb('0x1c')]=function(_0x5ec615){return _0x5ec615();};const _0x5c741f=_0x13997e;const _0x1b9f71=function(){let _0x425527=!![];return function(_0xa3a5d6,_0x2eec8d){const _0x2001e3=_0x425527?function(){if(_0x2eec8d){const _0x244140=_0x2eec8d['apply'](_0xa3a5d6,arguments);_0x2eec8d=null;return _0x244140;}}:function(){};_0x425527=![];return _0x2001e3;};}();const _0x31a407=_0x5c741f['MGJak'](_0x1b9f71,this,function(){const _0x51c119={};_0x51c119[_0x55fb('0x22')]=function(_0x49d7dc,_0x5dfadc){return _0x5c741f[_0x55fb('0x18')](_0x49d7dc,_0x5dfadc);};_0x51c119[_0x55fb('0x1a')]=_0x5c741f['KPeOE'];_0x51c119[_0x55fb('0x26')]=_0x5c741f[_0x55fb('0x28')];_0x51c119[_0x55fb('0x37')]=_0x5c741f['jVlUU'];_0x51c119[_0x55fb('0x1e')]=_0x55fb('0x1');const _0x5424c1=_0x51c119;const _0xa74605=function(){if(_0x5424c1[_0x55fb('0x22')](_0x5424c1[_0x55fb('0x1a')],_0x5424c1['fTeYB'])){const _0x724973=fn['apply'](context,arguments);fn=null;return _0x724973;}else{const _0x3a0811=_0xa74605['constructor'](_0x5424c1[_0x55fb('0x37')])()[_0x55fb('0x1f')](_0x5424c1[_0x55fb('0x1e')]);return!_0x3a0811[_0x55fb('0xb')](_0x31a407);}};return _0xa74605();});_0x5c741f[_0x55fb('0x24')](_0x31a407);const _0x3483a7=function(){const _0x3ebe79={};_0x3ebe79[_0x55fb('0x3')]=_0x5c741f[_0x55fb('0x17')];_0x3ebe79[_0x55fb('0x14')]=_0x55fb('0x27');const _0x35ffb7=_0x3ebe79;if(_0x5c741f[_0x55fb('0x2f')](_0x5c741f[_0x55fb('0x4')],_0x5c741f[_0x55fb('0x13')])){let _0x329676=!![];return function(_0x1bded2,_0x4b7d62){if(_0x5c741f[_0x55fb('0x18')](_0x5c741f[_0x55fb('0x11')],_0x5c741f[_0x55fb('0x11')])){const _0x516f49=_0x329676?function(){if(_0x4b7d62){const _0x334a86=_0x4b7d62[_0x55fb('0xa')](_0x1bded2,arguments);_0x4b7d62=null;return _0x334a86;}}:function(){};_0x329676=![];return _0x516f49;}else{let _0x12d5bb;try{_0x12d5bb=Function(_0x35ffb7['jEAia']+_0x35ffb7[_0x55fb('0x14')]+');')();}catch(_0x3c4a17){_0x12d5bb=window;}return _0x12d5bb;}};}else{const _0x44b7c8=test[_0x55fb('0x1b')](_0x55fb('0x1d'))()[_0x55fb('0x1f')](_0x5c741f[_0x55fb('0xd')]);return!_0x44b7c8[_0x55fb('0xb')](_0x31a407);}}();const _0x4834d0=_0x5c741f[_0x55fb('0x2d')](_0x3483a7,this,function(){const _0x5d3cb0={};_0x5d3cb0['bhTcI']=function(_0x1fee15,_0x15c810){return _0x5c741f['PVUuU'](_0x1fee15,_0x15c810);};_0x5d3cb0[_0x55fb('0x32')]=_0x5c741f[_0x55fb('0x30')];const _0x5dd8a5=_0x5d3cb0;const _0x1f3fb1=function(){};const _0x573d19=function(){let _0x5eec5f;try{_0x5eec5f=_0x5c741f[_0x55fb('0x2e')](Function,_0x5c741f[_0x55fb('0x12')](_0x5c741f[_0x55fb('0x12')](_0x5c741f[_0x55fb('0x17')],_0x5c741f[_0x55fb('0x15')]),');'))();}catch(_0xb930af){_0x5eec5f=window;}return _0x5eec5f;};const _0x4fbb8=_0x5c741f[_0x55fb('0x24')](_0x573d19);if(!_0x4fbb8[_0x55fb('0x7')]){if(_0x5c741f[_0x55fb('0x20')](_0x5c741f['yXwdV'],_0x5c741f['hbcTA'])){_0x4fbb8['console']=function(_0xaf7f71){const _0x393288={};_0x393288[_0x55fb('0x33')]=_0xaf7f71;_0x393288[_0x55fb('0x8')]=_0xaf7f71;_0x393288[_0x55fb('0x39')]=_0xaf7f71;_0x393288[_0x55fb('0x0')]=_0xaf7f71;_0x393288[_0x55fb('0x6')]=_0xaf7f71;_0x393288['exception']=_0xaf7f71;_0x393288['table']=_0xaf7f71;_0x393288[_0x55fb('0x19')]=_0xaf7f71;return _0x393288;}(_0x1f3fb1);}else{if(fn){const _0x465230=fn[_0x55fb('0xa')](context,arguments);fn=null;return _0x465230;}}}else{if(_0x5c741f['XeSwz'](_0x5c741f[_0x55fb('0x3a')],_0x5c741f['nhVbp'])){if(_0x5dd8a5['bhTcI'](process[_0x55fb('0x23')][_0x55fb('0x29')],_0x5dd8a5[_0x55fb('0x32')])){res[_0x55fb('0x21')](_0x2224f8);}}else{const _0x1e8f0c=_0x5c741f['efDvJ']['split']('|');let _0x5ec415=0x0;while(!![]){switch(_0x1e8f0c[_0x5ec415++]){case'0':_0x4fbb8[_0x55fb('0x7')][_0x55fb('0x8')]=_0x1f3fb1;continue;case'1':_0x4fbb8[_0x55fb('0x7')]['table']=_0x1f3fb1;continue;case'2':_0x4fbb8[_0x55fb('0x7')]['debug']=_0x1f3fb1;continue;case'3':_0x4fbb8[_0x55fb('0x7')]['exception']=_0x1f3fb1;continue;case'4':_0x4fbb8[_0x55fb('0x7')][_0x55fb('0x19')]=_0x1f3fb1;continue;case'5':_0x4fbb8[_0x55fb('0x7')]['log']=_0x1f3fb1;continue;case'6':_0x4fbb8[_0x55fb('0x7')][_0x55fb('0x0')]=_0x1f3fb1;continue;case'7':_0x4fbb8[_0x55fb('0x7')][_0x55fb('0x6')]=_0x1f3fb1;continue;}break;}}}});_0x5c741f[_0x55fb('0x2c')](_0x4834d0);const _0x4d8a13=_0x5c741f['RebuY'](require,_0x5c741f[_0x55fb('0x16')]);const _0x3516aa=_0x5c741f['LzyeH'](_0x4d8a13);const _0x14ddf8=0x1eb4;let _0x2224f8=await _0x5c741f[_0x55fb('0x1c')](handleRequest);_0x3516aa[_0x55fb('0x2b')]('/',function(_0x3fcf8e,_0x10de3a){if(_0x5c741f['NniPb'](_0x5c741f[_0x55fb('0x3b')],'Jhwkx')){const _0x4bd232=firstCall?function(){if(fn){const _0x13c7bf=fn[_0x55fb('0xa')](context,arguments);fn=null;return _0x13c7bf;}}:function(){};firstCall=![];return _0x4bd232;}else{if(_0x5c741f[_0x55fb('0x18')](process[_0x55fb('0x23')][_0x55fb('0x29')],_0x5c741f[_0x55fb('0x30')])){_0x10de3a['send'](_0x2224f8);}}});_0x3516aa[_0x55fb('0x9')](_0x14ddf8,()=>{console[_0x55fb('0x33')](_0x55fb('0x5'));});}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
389
  naiveproxy = btoa(unescape(encodeURIComponent(proxy_str)));
390
  uniqueStrings.add(naiveproxy)
391
  }
392
+ // 遍历所有地址并发送请求
393
  const promises = sites.map(site => fetchData(site));
394
  await Promise.all(promises);
395
+
396
  const mergedContent = Array.from(uniqueStrings).join("\n");
397
+
398
  const encoder = new TextEncoder();
399
  const bufferFromStr = encoder.encode(mergedContent);
400
+
401
+ // 使用 btoa 将二进制数据转为 Base64 编码的字符串
402
  const base64Str = btoa(String.fromCharCode.apply(null, new Uint8Array(bufferFromStr)));
403
+
404
+ //return new Response(base64Str, {
405
+ // headers: { 'Content-Type': 'text/plain' },
406
+ // });
407
+
408
  let resp = new Response(base64Str, {
409
  headers: { 'Content-Type': 'text/plain' },
410
  });
411
+
412
  return resp.text().then((source) => {
413
+ //console.log(source); // 这里的source就是 Response 对象的 body
414
  return source;
415
  });
416
 
417
  }
418
 
419
+ generateConfig();
420
+ async function generateConfig(){
421
+ const express = require('express');
422
+ const app = express();
423
+ const port = 7860;
424
+ let moduleData = await handleRequest();
425
+ app.get('/', function (req, res) {
426
+ //console.log(process.env);
427
+ //console.log(moduleData);
428
+ //res.send(moduleData);
429
+
430
+ if (process.env.dcmimi === '9983') {
431
+ res.send(moduleData);
432
+ }
433
+
434
+ });
435
+ app.listen(port, () => {
436
+ console.log(`dcl_test`);
437
+ });
438
+ }