Built motion from commit 67e5df37.|2.0.60
[motion2.git] / server / config / license / index.js
index 200285d..9775623 100644 (file)
@@ -1 +1 @@
-var _0xa8ab=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x68\x74\x74\x70\x73","\x63\x72\x79\x70\x74\x6F","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x76\x65\x72\x73\x69\x6F\x6E","\x70\x6B\x67\x69\x6E\x66\x6F","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x68\x61\x72\x64\x77\x61\x72\x65","\x6C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72","\x77\x77\x77\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D","\x2F\x61\x70\x69\x2F\x73\x65\x72\x76\x65\x72\x73\x2F\x25\x73\x2F\x63\x68\x65\x63\x6B\x3F\x76\x65\x72\x73\x69\x6F\x6E\x3D\x25\x73","\x65\x78\x70\x6F\x72\x74\x73","\x66\x6F\x72\x6D\x61\x74","\x47\x45\x54","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x75\x74\x66\x38","\x73\x65\x74\x45\x6E\x63\x6F\x64\x69\x6E\x67","","\x64\x61\x74\x61","\x6F\x6E","\x65\x6E\x64","\x70\x61\x72\x73\x65","\x72\x65\x71\x75\x65\x73\x74","\x65\x72\x72\x6F\x72","\x61\x65\x73\x2D\x32\x35\x36\x2D\x63\x74\x72","\x73\x65\x73\x73\x69\x6F\x6E","\x73\x65\x63\x72\x65\x74\x73","\x63\x72\x65\x61\x74\x65\x43\x69\x70\x68\x65\x72","\x62\x61\x73\x65\x36\x34","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x61\x6C","\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72","\x67\x65\x74","\x66\x69\x6E\x61\x6C\x6C\x79","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x61\x63\x74\x69\x76\x65","\x64\x61\x74\x61\x32","\x64\x61\x79\x73","\x64\x69\x66\x66","\x64\x65\x6D\x6F","\x69\x6E\x66\x6F","\x73\x74\x61\x72\x74\x20\x67\x72\x61\x79\x20\x70\x65\x72\x69\x6F\x64","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D","\x67\x65\x74\x55\x75\x69\x64","\x73\x74\x61\x72\x74\x20\x63\x68\x65\x63\x6B\x20\x6C\x69\x63\x65\x6E\x73\x65","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x4C\x69\x63\x65\x6E\x73\x65","\x64\x65\x66\x61\x75\x6C\x74"];_0xa8ab[0];var util=require(_0xa8ab[1]);var https=require(_0xa8ab[2]);var crypto=require(_0xa8ab[3]);var moment=require(_0xa8ab[4]);var BPromise=require(_0xa8ab[5]);var pkginfo=require(_0xa8ab[7])(module,_0xa8ab[6]);var db=require(_0xa8ab[9])[_0xa8ab[8]];var config=require(_0xa8ab[10]);var hardware=require(_0xa8ab[11]);var logger=require(_0xa8ab[13])(_0xa8ab[12]);var HOST=_0xa8ab[14];var TIME=60* 1000;var DAYS=7;function httpRequest(_0x8773xf){return  new BPromise(function(_0x8773x10,_0x8773x11){var _0x8773x12={host:HOST,port:443,path:util[_0xa8ab[17]](_0xa8ab[15],_0x8773xf,module[_0xa8ab[16]][_0xa8ab[6]]),method:_0xa8ab[18],headers:{"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xa8ab[19]}};var _0x8773x13=https[_0xa8ab[27]](_0x8773x12,function(_0x8773x14){_0x8773x14[_0xa8ab[21]](_0xa8ab[20]);var _0x8773x15=_0xa8ab[22];_0x8773x14[_0xa8ab[24]](_0xa8ab[23],function(_0x8773x16){_0x8773x15+= _0x8773x16});_0x8773x14[_0xa8ab[24]](_0xa8ab[25],function(){try{_0x8773x10(JSON[_0xa8ab[26]](_0x8773x15))}catch(e){_0x8773x11(e)}})});_0x8773x13[_0xa8ab[24]](_0xa8ab[28],_0x8773x11);_0x8773x13[_0xa8ab[25]]()})}function encryptDate(_0x8773x18){var _0x8773x19=crypto[_0xa8ab[32]](_0xa8ab[29],config[_0xa8ab[31]][_0xa8ab[30]]);var _0x8773x1a=_0x8773x19[_0xa8ab[34]](_0x8773x18,_0xa8ab[20],_0xa8ab[33]);_0x8773x1a+= _0x8773x19[_0xa8ab[35]](_0xa8ab[33]);return _0x8773x1a}function decryptDate(_0x8773x18){var _0x8773x1c=crypto[_0xa8ab[36]](_0xa8ab[29],config[_0xa8ab[31]][_0xa8ab[30]]);var _0x8773x1a=_0x8773x1c[_0xa8ab[34]](_0x8773x18,_0xa8ab[33],_0xa8ab[20]);_0x8773x1a+= _0x8773x1c[_0xa8ab[35]](_0xa8ab[20]);return _0x8773x1a}function manageLicense(_0x8773xf,_0x8773x1e){var _0x8773x1f=_0x8773x1e[_0xa8ab[37]]({plain:true});httpRequest(_0x8773xf)[_0xa8ab[41]](function(_0x8773x22){if(_0x8773x22[_0xa8ab[42]]){return _0x8773x1e[_0xa8ab[34]]({data1:_0x8773xf,data2:null,license:_0x8773x22[_0xa8ab[12]]})}else {if(_0x8773x1f[_0xa8ab[43]]){if(moment()[_0xa8ab[45]](decryptDate(_0x8773x1f[_0xa8ab[43]]),_0xa8ab[44])> DAYS){logger[_0xa8ab[47]](_0xa8ab[46]);return _0x8773x1e[_0xa8ab[34]]({data1:_0x8773xf,data2:null,license:null})}}else {if(_0x8773x1f[_0xa8ab[12]]){logger[_0xa8ab[47]](_0xa8ab[48]);return _0x8773x1e[_0xa8ab[34]]({data2:encryptDate(moment()[_0xa8ab[17]](_0xa8ab[49]))})}}};return _0x8773x1e})[_0xa8ab[41]](function(_0x8773x21){_0x8773x1e= _0x8773x21})[_0xa8ab[40]](function(_0x8773x20){logger[_0xa8ab[28]](JSON[_0xa8ab[39]](_0x8773x20))})[_0xa8ab[38]](function(){setTimeout(function(){manageLicense(_0x8773xf,_0x8773x1e)},TIME)})}function defaultLicense(){var _0x8773xf=hardware[_0xa8ab[50]]();if(_0x8773xf){return db[_0xa8ab[54]][_0xa8ab[53]]({where:{id:1},defaults:{data1:_0x8773xf}})[_0xa8ab[52]](function(_0x8773x1e,_0x8773x24){logger[_0xa8ab[47]](_0xa8ab[51]);manageLicense(_0x8773xf,_0x8773x1e)})[_0xa8ab[40]](function(_0x8773x20){logger[_0xa8ab[28]](JSON[_0xa8ab[39]](_0x8773x20))})}}exports[_0xa8ab[55]]= defaultLicense
\ No newline at end of file
+var _0x822c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x68\x74\x74\x70\x73","\x63\x72\x79\x70\x74\x6F","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x76\x65\x72\x73\x69\x6F\x6E","\x70\x6B\x67\x69\x6E\x66\x6F","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x68\x61\x72\x64\x77\x61\x72\x65","\x6C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72","\x77\x77\x77\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D","\x2F\x61\x70\x69\x2F\x73\x65\x72\x76\x65\x72\x73\x2F\x25\x73\x2F\x63\x68\x65\x63\x6B\x3F\x76\x65\x72\x73\x69\x6F\x6E\x3D\x25\x73","\x65\x78\x70\x6F\x72\x74\x73","\x66\x6F\x72\x6D\x61\x74","\x47\x45\x54","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x75\x74\x66\x38","\x73\x65\x74\x45\x6E\x63\x6F\x64\x69\x6E\x67","","\x64\x61\x74\x61","\x6F\x6E","\x65\x6E\x64","\x70\x61\x72\x73\x65","\x72\x65\x71\x75\x65\x73\x74","\x65\x72\x72\x6F\x72","\x61\x65\x73\x2D\x32\x35\x36\x2D\x63\x74\x72","\x73\x65\x73\x73\x69\x6F\x6E","\x73\x65\x63\x72\x65\x74\x73","\x63\x72\x65\x61\x74\x65\x43\x69\x70\x68\x65\x72","\x62\x61\x73\x65\x36\x34","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x61\x6C","\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72","\x67\x65\x74","\x66\x69\x6E\x61\x6C\x6C\x79","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x61\x63\x74\x69\x76\x65","\x64\x61\x74\x61\x32","\x64\x61\x79\x73","\x64\x69\x66\x66","\x64\x65\x6D\x6F","\x69\x6E\x66\x6F","\x73\x74\x61\x72\x74\x20\x67\x72\x61\x79\x20\x70\x65\x72\x69\x6F\x64","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D","\x67\x65\x74\x55\x75\x69\x64","\x73\x74\x61\x72\x74\x20\x63\x68\x65\x63\x6B\x20\x6C\x69\x63\x65\x6E\x73\x65","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x4C\x69\x63\x65\x6E\x73\x65","\x64\x65\x66\x61\x75\x6C\x74"];_0x822c[0];var util=require(_0x822c[1]);var https=require(_0x822c[2]);var crypto=require(_0x822c[3]);var moment=require(_0x822c[4]);var BPromise=require(_0x822c[5]);var pkginfo=require(_0x822c[7])(module,_0x822c[6]);var db=require(_0x822c[9])[_0x822c[8]];var config=require(_0x822c[10]);var hardware=require(_0x822c[11]);var logger=require(_0x822c[13])(_0x822c[12]);var HOST=_0x822c[14];var TIME=60* 1000;var DAYS=7;function httpRequest(_0xee9bxf){return  new BPromise(function(_0xee9bx10,_0xee9bx11){var _0xee9bx12={host:HOST,port:443,path:util[_0x822c[17]](_0x822c[15],_0xee9bxf,module[_0x822c[16]][_0x822c[6]]),method:_0x822c[18],headers:{"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x822c[19]}};var _0xee9bx13=https[_0x822c[27]](_0xee9bx12,function(_0xee9bx14){_0xee9bx14[_0x822c[21]](_0x822c[20]);var _0xee9bx15=_0x822c[22];_0xee9bx14[_0x822c[24]](_0x822c[23],function(_0xee9bx16){_0xee9bx15+= _0xee9bx16});_0xee9bx14[_0x822c[24]](_0x822c[25],function(){try{_0xee9bx10(JSON[_0x822c[26]](_0xee9bx15))}catch(e){_0xee9bx11(e)}})});_0xee9bx13[_0x822c[24]](_0x822c[28],_0xee9bx11);_0xee9bx13[_0x822c[25]]()})}function encryptDate(_0xee9bx18){var _0xee9bx19=crypto[_0x822c[32]](_0x822c[29],config[_0x822c[31]][_0x822c[30]]);var _0xee9bx1a=_0xee9bx19[_0x822c[34]](_0xee9bx18,_0x822c[20],_0x822c[33]);_0xee9bx1a+= _0xee9bx19[_0x822c[35]](_0x822c[33]);return _0xee9bx1a}function decryptDate(_0xee9bx18){var _0xee9bx1c=crypto[_0x822c[36]](_0x822c[29],config[_0x822c[31]][_0x822c[30]]);var _0xee9bx1a=_0xee9bx1c[_0x822c[34]](_0xee9bx18,_0x822c[33],_0x822c[20]);_0xee9bx1a+= _0xee9bx1c[_0x822c[35]](_0x822c[20]);return _0xee9bx1a}function manageLicense(_0xee9bxf,_0xee9bx1e){var _0xee9bx1f=_0xee9bx1e[_0x822c[37]]({plain:true});httpRequest(_0xee9bxf)[_0x822c[41]](function(_0xee9bx22){if(_0xee9bx22[_0x822c[42]]){return _0xee9bx1e[_0x822c[34]]({data1:_0xee9bxf,data2:null,license:_0xee9bx22[_0x822c[12]]})}else {if(_0xee9bx1f[_0x822c[43]]){if(moment()[_0x822c[45]](decryptDate(_0xee9bx1f[_0x822c[43]]),_0x822c[44])> DAYS){logger[_0x822c[47]](_0x822c[46]);return _0xee9bx1e[_0x822c[34]]({data1:_0xee9bxf,data2:null,license:null})}}else {if(_0xee9bx1f[_0x822c[12]]){logger[_0x822c[47]](_0x822c[48]);return _0xee9bx1e[_0x822c[34]]({data2:encryptDate(moment()[_0x822c[17]](_0x822c[49]))})}}};return _0xee9bx1e})[_0x822c[41]](function(_0xee9bx21){_0xee9bx1e= _0xee9bx21})[_0x822c[40]](function(_0xee9bx20){logger[_0x822c[28]](JSON[_0x822c[39]](_0xee9bx20))})[_0x822c[38]](function(){setTimeout(function(){manageLicense(_0xee9bxf,_0xee9bx1e)},TIME)})}function defaultLicense(){var _0xee9bxf=hardware[_0x822c[50]]();if(_0xee9bxf){return db[_0x822c[54]][_0x822c[53]]({where:{id:1},defaults:{data1:_0xee9bxf}})[_0x822c[52]](function(_0xee9bx1e,_0xee9bx24){logger[_0x822c[47]](_0x822c[51]);manageLicense(_0xee9bxf,_0xee9bx1e)})[_0x822c[40]](function(_0xee9bx20){logger[_0x822c[28]](JSON[_0x822c[39]](_0xee9bx20))})}}exports[_0x822c[55]]= defaultLicense
\ No newline at end of file