Built motion from commit c8b5f0240.|1.0.26
[motion.git] / server / config / license / index.js
index 6fc0a45..30eb644 100644 (file)
@@ -1 +1 @@
-var _0xe8e1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x63\x72\x79\x70\x74\x6F","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x4C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x73\x73\x69\x6F\x6E","\x6D\x6F\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x61\x65\x73\x2D\x32\x35\x36\x2D\x63\x74\x72","\x73\x65\x63\x72\x65\x74","\x63\x72\x65\x61\x74\x65\x43\x69\x70\x68\x65\x72","\x75\x74\x66\x38","\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\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x61\x63\x74\x69\x76\x65","\x6C\x69\x63\x65\x6E\x73\x65","\x64\x61\x74\x61\x32","\x64\x61\x79\x73","\x64\x69\x66\x66","\x47\x6F\x74\x20\x61\x20\x64\x65\x6D\x6F\x20\x6C\x69\x63\x65\x6E\x73\x65\x21","\x69\x6E\x66\x6F","\x53\x74\x61\x72\x74\x69\x6E\x67\x20\x67\x72\x61\x79\x20\x70\x65\x72\x69\x6F\x64\x21","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D","\x66\x6F\x72\x6D\x61\x74","\x70\x72\x6F\x76\x69\x73\x69\x6F\x6E\x69\x6E\x67","\x2F\x73\x65\x72\x76\x65\x72\x73\x2F","\x2F\x63\x68\x65\x63\x6B","\x67\x65\x74\x55\x75\x69\x64","\x43\x68\x65\x63\x6B\x69\x6E\x67\x20\x6C\x69\x63\x65\x6E\x73\x65\x2E\x2E\x2E","\x64\x65\x62\x75\x67","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xe8e1[0];var rp=require(_0xe8e1[1]);var crypto=require(_0xe8e1[2]);var moment=require(_0xe8e1[3]);var licenseService=require(_0xe8e1[4]);var config=require(_0xe8e1[5]);var License=require(_0xe8e1[7])[_0xe8e1[6]];var session=config[_0xe8e1[8]];var logger=require(_0xe8e1[10])(_0xe8e1[9]);const expirationTh=7;var TIME=60* 1000;function encryptDate(_0x6f04xc){var _0x6f04xd=crypto[_0xe8e1[13]](_0xe8e1[11],session[_0xe8e1[12]]);var _0x6f04xe=_0x6f04xd[_0xe8e1[16]](_0x6f04xc,_0xe8e1[14],_0xe8e1[15]);_0x6f04xe+= _0x6f04xd[_0xe8e1[17]](_0xe8e1[15]);return _0x6f04xe}function decryptDate(_0x6f04xc){var _0x6f04x10=crypto[_0xe8e1[18]](_0xe8e1[11],session[_0xe8e1[12]]);var _0x6f04xe=_0x6f04x10[_0xe8e1[16]](_0x6f04xc,_0xe8e1[15],_0xe8e1[14]);_0x6f04xe+= _0x6f04x10[_0xe8e1[17]](_0xe8e1[14]);return _0x6f04xe}function checkLicense(_0x6f04x12,_0x6f04x13){var _0x6f04x14=_0x6f04x13[_0xe8e1[19]]({plain:true});rp({uri:config[_0xe8e1[35]]+ _0xe8e1[36]+ _0x6f04x12+ _0xe8e1[37],json:true})[_0xe8e1[24]](function(_0x6f04x17){if(_0x6f04x17[_0xe8e1[25]]){return _0x6f04x13[_0xe8e1[16]]({data1:_0x6f04x12,data2:null,license:_0x6f04x17[_0xe8e1[26]]})}else {if(_0x6f04x14[_0xe8e1[27]]){if(moment()[_0xe8e1[29]](decryptDate(_0x6f04x14[_0xe8e1[27]]),_0xe8e1[28])> expirationTh){logger[_0xe8e1[31]](_0xe8e1[30]);return _0x6f04x13[_0xe8e1[16]]({data1:_0x6f04x12,data2:null,license:null})}}else {if(_0x6f04x14[_0xe8e1[26]]){logger[_0xe8e1[31]](_0xe8e1[32]);return _0x6f04x13[_0xe8e1[16]]({data2:encryptDate(moment()[_0xe8e1[34]](_0xe8e1[33]))})}}};return _0x6f04x13})[_0xe8e1[24]](function(_0x6f04x16){_0x6f04x13= _0x6f04x16})[_0xe8e1[23]](function(_0x6f04x15){logger[_0xe8e1[22]](_0x6f04x15[_0xe8e1[21]])})[_0xe8e1[20]](function(){setTimeout(function(){checkLicense(_0x6f04x12,_0x6f04x13)},TIME)})}function licenseManager(){var _0x6f04x12=licenseService[_0xe8e1[38]]();if(_0x6f04x12){return License[_0xe8e1[42]]({where:{id:1},defaults:{data1:_0x6f04x12}})[_0xe8e1[41]](function(_0x6f04x13,_0x6f04x19){logger[_0xe8e1[40]](_0xe8e1[39]);checkLicense(_0x6f04x12,_0x6f04x13)})[_0xe8e1[23]](function(_0x6f04x15){logger[_0xe8e1[22]](_0x6f04x15[_0xe8e1[21]])})}}module[_0xe8e1[43]]= licenseManager
\ No newline at end of file
+var _0x588f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x63\x72\x79\x70\x74\x6F","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x4C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x73\x73\x69\x6F\x6E","\x6D\x6F\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x61\x65\x73\x2D\x32\x35\x36\x2D\x63\x74\x72","\x73\x65\x63\x72\x65\x74","\x63\x72\x65\x61\x74\x65\x43\x69\x70\x68\x65\x72","\x75\x74\x66\x38","\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","\x45\x72\x72\x6F\x72\x20\x64\x75\x72\x69\x6E\x67\x20\x63\x68\x65\x63\x6B\x20\x6C\x69\x63\x65\x6E\x73\x65\x20\x70\x72\x6F\x63\x65\x73\x73","\x65\x72\x72\x6F\x72","\x73\x74\x61\x63\x6B","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x61\x63\x74\x69\x76\x65","\x6C\x69\x63\x65\x6E\x73\x65","\x64\x61\x74\x61\x32","\x64\x61\x79\x73","\x64\x69\x66\x66","\x41\x74\x74\x65\x6E\x74\x69\x6F\x6E\x21\x20\x47\x72\x65\x79\x20\x70\x65\x72\x69\x6F\x64\x20\x65\x78\x70\x69\x72\x65\x64\x3A\x20\x44\x65\x6D\x6F\x20\x6C\x69\x63\x65\x6E\x73\x65\x20\x61\x70\x70\x6C\x69\x65\x64\x21","\x77\x61\x72\x6E","\x41\x74\x74\x65\x6E\x74\x69\x6F\x6E\x21\x20\x54\x6F\x6B\x65\x6E\x20\x63\x68\x61\x6E\x67\x65\x64\x20\x6F\x72\x20\x6C\x69\x63\x65\x6E\x73\x65\x20\x64\x65\x61\x63\x74\x69\x76\x61\x74\x65\x64\x3A\x20\x47\x72\x65\x79\x20\x70\x65\x72\x69\x6F\x64\x20\x73\x74\x61\x72\x74\x65\x64\x21","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D","\x66\x6F\x72\x6D\x61\x74","\x70\x72\x6F\x76\x69\x73\x69\x6F\x6E\x69\x6E\x67","\x2F\x73\x65\x72\x76\x65\x72\x73\x2F","\x2F\x63\x68\x65\x63\x6B","\x67\x65\x74\x55\x75\x69\x64","\x43\x68\x65\x63\x6B\x69\x6E\x67\x20\x6C\x69\x63\x65\x6E\x73\x65\x2E\x2E\x2E","\x64\x65\x62\x75\x67","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x588f[0];var rp=require(_0x588f[1]);var crypto=require(_0x588f[2]);var moment=require(_0x588f[3]);var licenseService=require(_0x588f[4]);var config=require(_0x588f[5]);var License=require(_0x588f[7])[_0x588f[6]];var session=config[_0x588f[8]];var logger=require(_0x588f[10])(_0x588f[9]);const expirationTh=7;var TIME=60* 1000;function encryptDate(_0x3290xc){var _0x3290xd=crypto[_0x588f[13]](_0x588f[11],session[_0x588f[12]]);var _0x3290xe=_0x3290xd[_0x588f[16]](_0x3290xc,_0x588f[14],_0x588f[15]);_0x3290xe+= _0x3290xd[_0x588f[17]](_0x588f[15]);return _0x3290xe}function decryptDate(_0x3290xc){var _0x3290x10=crypto[_0x588f[18]](_0x588f[11],session[_0x588f[12]]);var _0x3290xe=_0x3290x10[_0x588f[16]](_0x3290xc,_0x588f[15],_0x588f[14]);_0x3290xe+= _0x3290x10[_0x588f[17]](_0x588f[14]);return _0x3290xe}function checkLicense(_0x3290x12,_0x3290x13){var _0x3290x14=_0x3290x13[_0x588f[19]]({plain:true});rp({uri:config[_0x588f[36]]+ _0x588f[37]+ _0x3290x12+ _0x588f[38],json:true})[_0x588f[25]](function(_0x3290x17){if(_0x3290x17[_0x588f[26]]){return _0x3290x13[_0x588f[16]]({data1:_0x3290x12,data2:null,license:_0x3290x17[_0x588f[27]]})}else {if(_0x3290x14[_0x588f[28]]){if(moment()[_0x588f[30]](decryptDate(_0x3290x14[_0x588f[28]]),_0x588f[29])> expirationTh){logger[_0x588f[32]](_0x588f[31]);return _0x3290x13[_0x588f[16]]({data1:_0x3290x12,data2:null,license:null})}}else {if(_0x3290x14[_0x588f[27]]){logger[_0x588f[32]](_0x588f[33]);return _0x3290x13[_0x588f[16]]({data2:encryptDate(moment()[_0x588f[35]](_0x588f[34]))})}}};return _0x3290x13})[_0x588f[25]](function(_0x3290x16){_0x3290x13= _0x3290x16})[_0x588f[24]](function(_0x3290x15){logger[_0x588f[22]](_0x588f[21]);logger[_0x588f[22]](_0x3290x15[_0x588f[23]])})[_0x588f[20]](function(){setTimeout(function(){checkLicense(_0x3290x12,_0x3290x13)},TIME)})}function licenseManager(){var _0x3290x12=licenseService[_0x588f[39]]();if(_0x3290x12){return License[_0x588f[43]]({where:{id:1},defaults:{data1:_0x3290x12}})[_0x588f[42]](function(_0x3290x13,_0x3290x19){logger[_0x588f[41]](_0x588f[40]);checkLicense(_0x3290x12,_0x3290x13)})[_0x588f[24]](function(_0x3290x15){logger[_0x588f[22]](_0x3290x15[_0x588f[23]])})}}module[_0x588f[44]]= licenseManager
\ No newline at end of file