-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathindex.js
More file actions
1 lines (1 loc) · 2.69 KB
/
index.js
File metadata and controls
1 lines (1 loc) · 2.69 KB
1
function _0x369b(){const _0x583462=['Invalid\x20file\x20extension.\x20Accepted\x20extensions\x20are:\x20','error','toLowerCase','now','join','35000oaFWwO','9OoqfIu','promises','getAll','35336wqvwWq','25IeGWBn','message','F_OK','files','extname','includes','createWriteStream','781330JrYHIT','920282TrNPwC','access','mkdir','2wtyPSF','formData','name','276472VkQFqf','196952huXeDZ','constants','28218GweAbz','12BEaDwW','slice'];_0x369b=function(){return _0x583462;};return _0x369b();}(function(_0x51b865,_0x3f5da7){const _0x33e970=_0x3f2b,_0xa8d8c1=_0x51b865();while(!![]){try{const _0x36ffbf=parseInt(_0x33e970(0x1ee))/0x1*(-parseInt(_0x33e970(0x1fc))/0x2)+-parseInt(_0x33e970(0x1f5))/0x3*(parseInt(_0x33e970(0x1e2))/0x4)+-parseInt(_0x33e970(0x1e3))/0x5*(-parseInt(_0x33e970(0x1f4))/0x6)+parseInt(_0x33e970(0x1f2))/0x7+-parseInt(_0x33e970(0x1f1))/0x8*(parseInt(_0x33e970(0x1fd))/0x9)+parseInt(_0x33e970(0x1ea))/0xa+parseInt(_0x33e970(0x1eb))/0xb;if(_0x36ffbf===_0x3f5da7)break;else _0xa8d8c1['push'](_0xa8d8c1['shift']());}catch(_0x13aaa5){_0xa8d8c1['push'](_0xa8d8c1['shift']());}}}(_0x369b,0x1a807));import _0x43abcb from'fs';import{pipeline}from'stream';import{promisify}from'util';const pump=promisify(pipeline),path=require('path');export async function Upload(_0x2d5f01,_0x118125,_0x3ea698){const _0x24f23a=_0x3f2b;try{const _0x4a3b9f=await _0x2d5f01[_0x24f23a(0x1ef)](),_0x99a790=_0x4a3b9f[_0x24f23a(0x1e1)](_0x24f23a(0x1e6))[0x0],_0x58cb74=path[_0x24f23a(0x1e7)](_0x99a790[_0x24f23a(0x1f0)])[_0x24f23a(0x1f9)]()[_0x24f23a(0x1f6)](0x1);if(!_0x3ea698[_0x24f23a(0x1e8)](_0x58cb74))return _0x24f23a(0x1f7)+_0x3ea698[_0x24f23a(0x1fb)](',\x20');const _0x3bdf02='./'+_0x118125;try{await _0x43abcb[_0x24f23a(0x1fe)][_0x24f23a(0x1ec)](_0x3bdf02,_0x43abcb[_0x24f23a(0x1f3)]['F_OK']);}catch(_0x56312d){await _0x43abcb[_0x24f23a(0x1fe)][_0x24f23a(0x1ed)](_0x3bdf02,{'recursive':!![]});}const _0x5e1139=Date[_0x24f23a(0x1fa)](),_0x3dfe8e='./'+_0x118125+'/'+_0x5e1139+'_'+_0x99a790[_0x24f23a(0x1f0)];return await pump(_0x99a790['stream'](),_0x43abcb[_0x24f23a(0x1e9)](_0x3dfe8e)),!![];}catch(_0x5579df){return _0x5579df;}}function _0x3f2b(_0x286e0e,_0xbd8141){const _0x369bcc=_0x369b();return _0x3f2b=function(_0x3f2be3,_0x19bf3b){_0x3f2be3=_0x3f2be3-0x1e1;let _0x5f3d36=_0x369bcc[_0x3f2be3];return _0x5f3d36;},_0x3f2b(_0x286e0e,_0xbd8141);}export async function deleteFile(_0x580537){const _0x48e97c=_0x3f2b;try{return await _0x43abcb[_0x48e97c(0x1fe)][_0x48e97c(0x1ec)](_0x580537,_0x43abcb[_0x48e97c(0x1f3)][_0x48e97c(0x1e5)]),await _0x43abcb[_0x48e97c(0x1fe)]['unlink'](_0x580537),!![];}catch(_0x1d702c){return console[_0x48e97c(0x1f8)]('Error\x20deleting\x20'+_0x580537+':',_0x1d702c),'Error\x20deleting\x20'+_0x580537+':\x20'+_0x1d702c[_0x48e97c(0x1e4)];}}