Built motion from commit ecdc8e66766c75b1b08288b0ea13eb12d42606b4. Version 3.0.0...
[motion-next.git] / server / api / system / system.controller.js
index 703a756..e41f05c 100644 (file)
@@ -1 +1 @@
-const a619_0x48cc=['index','name','components/import/cm','pid','Process\x20with\x20pid\x20%s\x20killed\x20correctly','params','killProcess','inspect','json','catch','send','SIGINT','Process\x20with\x20pid\x20%s\x20not\x20found!','indexOf','error','ps\x20-p\x20%s\x20-ww\x20-o\x20args','util','format','status','../../config/logger','api','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s'];(function(_0x538b11,_0x48cc17){const _0x2a7d8a=function(_0x2af21c){while(--_0x2af21c){_0x538b11['push'](_0x538b11['shift']());}};_0x2a7d8a(++_0x48cc17);}(a619_0x48cc,0x6f));const a619_0x2a7d=function(_0x538b11,_0x48cc17){_0x538b11=_0x538b11-0x0;let _0x2a7d8a=a619_0x48cc[_0x538b11];return _0x2a7d8a;};const _0x4fc097=a619_0x2a7d;'use strict';const info=require('systeminformation'),exec=require('child_process')['exec'],logger=require(_0x4fc097('0x12'))(_0x4fc097('0x13')),util=require(_0x4fc097('0xf'));function handleError(_0x2af21c,_0x2b62ca,_0x157ff){return _0x2b62ca=_0x2b62ca||0x1f4,function(_0x54f489){const _0x388cc5=a619_0x2a7d;logger[_0x388cc5('0xd')](_0x388cc5('0x14'),_0x157ff,_0x2b62ca,util[_0x388cc5('0x6')](_0x54f489,{'showHidden':![],'depth':null})),delete _0x54f489[_0x388cc5('0x0')],_0x2af21c[_0x388cc5('0x11')](_0x2b62ca)[_0x388cc5('0x9')](_0x54f489);};}exports[_0x4fc097('0x15')]=function(_0x36998d,_0x3069fa){const _0x4267ef=_0x4fc097;return info['getAllData']()['then'](function(_0x351334){const _0x5ea820=a619_0x2a7d;return _0x3069fa[_0x5ea820('0x11')](0xc8)[_0x5ea820('0x7')](_0x351334);})[_0x4267ef('0x8')](function(_0x396532){const _0xc1b299=_0x4267ef;return _0x3069fa[_0xc1b299('0x11')](0x1f4)['json'](_0x396532);});},exports['killProcess']=function(_0x589a54,_0x454a08){const _0x36e625=_0x4fc097,_0x520b19=[_0x36e625('0x1')];return new Promise(function(_0x51f76c,_0x3b37ae){const _0x1ac140=_0x36e625;return exec(util[_0x1ac140('0x10')](_0x1ac140('0xe'),_0x589a54['params'][_0x1ac140('0x2')]),function(_0x7cf772,_0x5a49e6){if(_0x7cf772)return _0x3b37ae(_0x7cf772);return _0x51f76c(_0x5a49e6);});})['then'](function(_0x114e53){const _0x2049fd=_0x36e625;let _0x129cd1=![];for(let _0x4ef184=0x0,_0x79914b=_0x520b19['length'];_0x4ef184<_0x79914b,_0x129cd1===![];_0x4ef184+=0x1){_0x114e53[_0x2049fd('0xc')](_0x520b19[_0x4ef184])>=0x0&&(_0x129cd1=!![]);}if(!_0x129cd1)throw new Error(util[_0x2049fd('0x10')](_0x2049fd('0xb'),_0x589a54['params']['pid']));return process['kill'](_0x589a54[_0x2049fd('0x4')][_0x2049fd('0x2')],_0x2049fd('0xa')),_0x454a08['status'](0xc8)[_0x2049fd('0x7')]({'message':util[_0x2049fd('0x10')](_0x2049fd('0x3'),_0x589a54['params'][_0x2049fd('0x2')])});})[_0x36e625('0x8')](handleError(_0x454a08,null,_0x36e625('0x5')));};
\ No newline at end of file
+const a619_0x2b4a=['index','pid','send','format','then','params','util','getAllData','api','systeminformation','indexOf','Process\x20with\x20pid\x20%s\x20not\x20found!','exec','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','inspect','../../config/logger','catch','status','ps\x20-p\x20%s\x20-ww\x20-o\x20args','SIGINT','name','components/import/cm','json','killProcess'];(function(_0x101c11,_0x2b4a3e){const _0x27319e=function(_0x1ac9d3){while(--_0x1ac9d3){_0x101c11['push'](_0x101c11['shift']());}};_0x27319e(++_0x2b4a3e);}(a619_0x2b4a,0xb1));const a619_0x2731=function(_0x101c11,_0x2b4a3e){_0x101c11=_0x101c11-0x0;let _0x27319e=a619_0x2b4a[_0x101c11];return _0x27319e;};const _0x4fcabb=a619_0x2731;'use strict';const info=require(_0x4fcabb('0x0')),exec=require('child_process')[_0x4fcabb('0x3')],logger=require(_0x4fcabb('0x6'))(_0x4fcabb('0x17')),util=require(_0x4fcabb('0x15'));function handleError(_0x1ac9d3,_0x40fa45,_0x33ad73){return _0x40fa45=_0x40fa45||0x1f4,function(_0x3b4214){const _0x4b2edb=a619_0x2731;logger['error'](_0x4b2edb('0x4'),_0x33ad73,_0x40fa45,util[_0x4b2edb('0x5')](_0x3b4214,{'showHidden':![],'depth':null})),delete _0x3b4214[_0x4b2edb('0xb')],_0x1ac9d3[_0x4b2edb('0x8')](_0x40fa45)[_0x4b2edb('0x11')](_0x3b4214);};}exports[_0x4fcabb('0xf')]=function(_0x12865d,_0x575004){const _0x163478=_0x4fcabb;return info[_0x163478('0x16')]()[_0x163478('0x13')](function(_0x22b4e8){return _0x575004['status'](0xc8)['json'](_0x22b4e8);})[_0x163478('0x7')](function(_0x21df46){const _0x446bcc=_0x163478;return _0x575004[_0x446bcc('0x8')](0x1f4)['json'](_0x21df46);});},exports[_0x4fcabb('0xe')]=function(_0x5bf866,_0x34a66b){const _0x5ce030=_0x4fcabb,_0xe95b47=[_0x5ce030('0xc')];return new Promise(function(_0x30ba84,_0x1935da){const _0x54bb65=_0x5ce030;return exec(util[_0x54bb65('0x12')](_0x54bb65('0x9'),_0x5bf866['params']['pid']),function(_0x5cf6b1,_0x4c1b1d){if(_0x5cf6b1)return _0x1935da(_0x5cf6b1);return _0x30ba84(_0x4c1b1d);});})[_0x5ce030('0x13')](function(_0x52f4e4){const _0x4e4b9a=_0x5ce030;let _0x463a6=![];for(let _0x8f144b=0x0,_0x376a3a=_0xe95b47['length'];_0x8f144b<_0x376a3a,_0x463a6===![];_0x8f144b+=0x1){_0x52f4e4[_0x4e4b9a('0x1')](_0xe95b47[_0x8f144b])>=0x0&&(_0x463a6=!![]);}if(!_0x463a6)throw new Error(util[_0x4e4b9a('0x12')](_0x4e4b9a('0x2'),_0x5bf866[_0x4e4b9a('0x14')]['pid']));return process['kill'](_0x5bf866[_0x4e4b9a('0x14')][_0x4e4b9a('0x10')],_0x4e4b9a('0xa')),_0x34a66b[_0x4e4b9a('0x8')](0xc8)[_0x4e4b9a('0xd')]({'message':util[_0x4e4b9a('0x12')]('Process\x20with\x20pid\x20%s\x20killed\x20correctly',_0x5bf866[_0x4e4b9a('0x14')][_0x4e4b9a('0x10')])});})[_0x5ce030('0x7')](handleError(_0x34a66b,null,_0x5ce030('0xe')));};
\ No newline at end of file