Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / config / license / util.js
index 6d63534..cc3c444 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x24ab=['2027-01-01T00:00:00.000Z','Breaking\x20license','message','Demo\x20license','getLicense','defaults','then','checkLicense','crypto','util','lodash','moment','./hardware','../environment','../../mysqldb','license','isEmpty','License\x20key\x20value\x20not\x20found','data1','data2','split','aes-256-ctr','format','base64','utf8','final','parse','demo','uuid','machineUuid','getUuid','secrets','gray','add','days','grayReason','disabled'];(function(_0xe368ad,_0x24ea9c){var _0x8fabb0=function(_0x1845e0){while(--_0x1845e0){_0xe368ad['push'](_0xe368ad['shift']());}};_0x8fabb0(++_0x24ea9c);}(_0x24ab,0x1c4));var _0xb24a=function(_0x45ce51,_0x170ba8){_0x45ce51=_0x45ce51-0x0;var _0x2fdd48=_0x24ab[_0x45ce51];return _0x2fdd48;};'use strict';var crypto=require(_0xb24a('0x0'));var util=require(_0xb24a('0x1'));var _=require(_0xb24a('0x2'));var moment=require(_0xb24a('0x3'));var hardware=require(_0xb24a('0x4'));var config=require(_0xb24a('0x5'));var db=require(_0xb24a('0x6'))['db'];function checkLicense(_0x20aca1,_0x494109){if(_0x20aca1){try{var _0x1d309e=_0x494109||_0x20aca1[_0xb24a('0x7')];if(_[_0xb24a('0x8')](_0x1d309e)){throw new Error(_0xb24a('0x9'));}var _0x1b3e7c=_0x20aca1[_0xb24a('0xa')];var _0x430b9d=_0x20aca1[_0xb24a('0xb')];var _0x588d0e=_0x1b3e7c[_0xb24a('0xc')]('-')[0x4];var _0x1640ac=_0x1b3e7c[_0xb24a('0xc')]('-')[0x0];var _0x2d2825=crypto['createDecipher'](_0xb24a('0xd'),util[_0xb24a('0xe')]('%s:%s:%s',_0x588d0e,_0x1b3e7c,_0x1640ac));var _0x219c5c=_0x2d2825['update'](_0x1d309e,_0xb24a('0xf'),_0xb24a('0x10'));_0x219c5c+=_0x2d2825[_0xb24a('0x11')](_0xb24a('0x10'));var _0xd24047=JSON[_0xb24a('0x12')](_0x219c5c);_0xd24047[_0xb24a('0x13')]=![];_0xd24047[_0xb24a('0x14')]=_0x1b3e7c;_0xd24047[_0xb24a('0x15')]=hardware[_0xb24a('0x16')]();if(_0x430b9d){var _0x1de3fc=crypto['createDecipher'](_0xb24a('0xd'),config[_0xb24a('0x17')]['session']);var _0x511796=_0x1de3fc['update'](_0x430b9d,'base64',_0xb24a('0x10'));_0x511796+=_0x1de3fc[_0xb24a('0x11')](_0xb24a('0x10'));_0xd24047[_0xb24a('0x18')]=_0x511796;_0xd24047['deadline']=moment(_0x511796)[_0xb24a('0x19')](0x7,_0xb24a('0x1a'))['format']();_0xd24047[_0xb24a('0x1b')]=_0xd24047[_0xb24a('0x14')]!=_0xd24047[_0xb24a('0x15')]?'changed':_0xb24a('0x1c');}return _0xd24047;}catch(_0x33ea1f){return{'breaking':!![],'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':_0xb24a('0x1d'),'chat':![],'mail':![],'fax':![],'messaging':![],'whatsapp':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'update':![],'description':_0xb24a('0x1e'),'uuid':_0x20aca1['data1'],'machineUuid':hardware[_0xb24a('0x16')](),'message':_0x33ea1f[_0xb24a('0x1f')],'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![],'ai':![]};}}return{'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':_0xb24a('0x1d'),'chat':![],'mail':![],'fax':![],'messaging':![],'whatsapp':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'description':_0xb24a('0x20'),'uuid':_0x20aca1[_0xb24a('0xa')],'machineUuid':hardware['getUuid'](),'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![],'ai':![]};}exports[_0xb24a('0x21')]=function(_0x4f69ce){return db['License']['find'](_[_0xb24a('0x22')](_0x4f69ce,{'raw':!![],'where':{'id':0x1}}))[_0xb24a('0x23')](function(_0x36bc5f){return checkLicense(_0x36bc5f,null);});};exports[_0xb24a('0x24')]=checkLicense;
\ No newline at end of file
+var _0x1eb7=['getLicense','find','defaults','then','checkLicense','crypto','util','lodash','./hardware','../environment','../../mysqldb','license','isEmpty','License\x20key\x20value\x20not\x20found','data1','data2','split','createDecipher','format','%s:%s:%s','update','base64','final','utf8','parse','demo','getUuid','aes-256-ctr','secrets','session','add','days','grayReason','machineUuid','changed','disabled','2027-01-01T00:00:00.000Z','message'];(function(_0x4861ba,_0x3e20e4){var _0x250a6e=function(_0x55864f){while(--_0x55864f){_0x4861ba['push'](_0x4861ba['shift']());}};_0x250a6e(++_0x3e20e4);}(_0x1eb7,0x135));var _0x71eb=function(_0x5440fc,_0x74219b){_0x5440fc=_0x5440fc-0x0;var _0x2ca61f=_0x1eb7[_0x5440fc];return _0x2ca61f;};'use strict';var crypto=require(_0x71eb('0x0'));var util=require(_0x71eb('0x1'));var _=require(_0x71eb('0x2'));var moment=require('moment');var hardware=require(_0x71eb('0x3'));var config=require(_0x71eb('0x4'));var db=require(_0x71eb('0x5'))['db'];function checkLicense(_0x2efd7c,_0x594dbb){if(_0x2efd7c){try{var _0x35caa3=_0x594dbb||_0x2efd7c[_0x71eb('0x6')];if(_[_0x71eb('0x7')](_0x35caa3)){throw new Error(_0x71eb('0x8'));}var _0x41f419=_0x2efd7c[_0x71eb('0x9')];var _0x1d882e=_0x2efd7c[_0x71eb('0xa')];var _0x1cb98d=_0x41f419[_0x71eb('0xb')]('-')[0x4];var _0x1cf98f=_0x41f419[_0x71eb('0xb')]('-')[0x0];var _0x45fcfe=crypto[_0x71eb('0xc')]('aes-256-ctr',util[_0x71eb('0xd')](_0x71eb('0xe'),_0x1cb98d,_0x41f419,_0x1cf98f));var _0x19f9a6=_0x45fcfe[_0x71eb('0xf')](_0x35caa3,_0x71eb('0x10'),'utf8');_0x19f9a6+=_0x45fcfe[_0x71eb('0x11')](_0x71eb('0x12'));var _0x5338ca=JSON[_0x71eb('0x13')](_0x19f9a6);_0x5338ca[_0x71eb('0x14')]=![];_0x5338ca['uuid']=_0x41f419;_0x5338ca['machineUuid']=hardware[_0x71eb('0x15')]();if(_0x1d882e){var _0x302915=crypto[_0x71eb('0xc')](_0x71eb('0x16'),config[_0x71eb('0x17')][_0x71eb('0x18')]);var _0x3e6cd0=_0x302915['update'](_0x1d882e,'base64','utf8');_0x3e6cd0+=_0x302915[_0x71eb('0x11')](_0x71eb('0x12'));_0x5338ca['gray']=_0x3e6cd0;_0x5338ca['deadline']=moment(_0x3e6cd0)[_0x71eb('0x19')](0x7,_0x71eb('0x1a'))[_0x71eb('0xd')]();_0x5338ca[_0x71eb('0x1b')]=_0x5338ca['uuid']!=_0x5338ca[_0x71eb('0x1c')]?_0x71eb('0x1d'):_0x71eb('0x1e');}return _0x5338ca;}catch(_0x36a412){return{'breaking':!![],'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':_0x71eb('0x1f'),'chat':![],'mail':![],'fax':![],'messaging':![],'whatsapp':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'update':![],'description':'Breaking\x20license','uuid':_0x2efd7c['data1'],'machineUuid':hardware[_0x71eb('0x15')](),'message':_0x36a412[_0x71eb('0x20')],'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![],'ai':![]};}}return{'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':'2027-01-01T00:00:00.000Z','chat':![],'mail':![],'fax':![],'messaging':![],'whatsapp':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'description':'Demo\x20license','uuid':_0x2efd7c['data1'],'machineUuid':hardware[_0x71eb('0x15')](),'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![],'ai':![]};}exports[_0x71eb('0x21')]=function(_0x442553){return db['License'][_0x71eb('0x22')](_[_0x71eb('0x23')](_0x442553,{'raw':!![],'where':{'id':0x1}}))[_0x71eb('0x24')](function(_0x290ba6){return checkLicense(_0x290ba6,null);});};exports[_0x71eb('0x25')]=checkLicense;
\ No newline at end of file