Built motion from commit 95c3d5ad5.|1.0.29
[motion.git] / server / config / tools / channelSpy.js
index ffa4718..f4a6100 100644 (file)
@@ -1 +1 @@
-var _0xb2af=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x43\x68\x61\x6E\x53\x70\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x72\x65\x73\x6F\x6C\x76\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x6C\x65\x74\x65","\x69\x64","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79","\x61\x6C\x6C","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x25\x73\x25\x73","\x70\x72\x65\x66\x69\x78","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x53\x65\x74","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x25\x73","\x63\x68\x61\x6E\x73\x70\x79","\x73\x79\x73\x74\x65\x6D","\x70\x75\x73\x68","\x61\x75\x74\x68","\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x63\x6F\x72\x64","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x24\x7B\x55\x4E\x49\x51\x55\x45\x49\x44\x7D\x2E\x25\x73","\x53\x49\x50\x2F\x25\x73\x2C\x25\x73","\x6F\x70\x74\x69\x6F\x6E\x73","\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x66\x6F\x72\x45\x61\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xb2af[0];var fs=require(_0xb2af[1]);var util=require(_0xb2af[2]);var path=require(_0xb2af[3]);var config=require(_0xb2af[4]);var ChanSpyModel=require(_0xb2af[6])[_0xb2af[5]];var User=require(_0xb2af[6])[_0xb2af[7]];var VoiceExtension=require(_0xb2af[6])[_0xb2af[8]];var sequelize=require(_0xb2af[6])[_0xb2af[9]];var Promise=require(_0xb2af[10]);var logger=require(_0xb2af[12])(_0xb2af[11]);function ChanSpy(){ChanSpyModel[_0xb2af[18]](function(_0xda7cxc,_0xda7cxd){return Promise[_0xb2af[17]]()[_0xb2af[16]](createSpyExtensions(_0xda7cxc,_0xda7cxd))[_0xb2af[15]](function(_0xda7cxe){logger[_0xb2af[14]](_0xda7cxe[_0xb2af[13]])})});ChanSpyModel[_0xb2af[19]](function(_0xda7cxc,_0xda7cxd){return Promise[_0xb2af[17]]()[_0xb2af[16]](deleteSpyExtensions(_0xda7cxc,_0xda7cxd))[_0xb2af[16]](createSpyExtensions(_0xda7cxc,_0xda7cxd))[_0xb2af[15]](function(_0xda7cxe){logger[_0xb2af[14]](_0xda7cxe[_0xb2af[13]])})});ChanSpyModel[_0xb2af[20]](function(_0xda7cxc,_0xda7cxd){return Promise[_0xb2af[17]]()[_0xb2af[16]](deleteSpyExtensions(_0xda7cxc,_0xda7cxd))[_0xb2af[15]](function(_0xda7cxe){logger[_0xb2af[14]](_0xda7cxe[_0xb2af[13]])})})}function deleteSpyExtensions(_0xda7cxc,_0xda7cxd){return function(){return VoiceExtension[_0xb2af[23]]({where:{ChanSpyId:_0xda7cxc[_0xb2af[21]]},transaction:_0xda7cxd[_0xb2af[22]]})}}function createSpyExtensions(_0xda7cxc,_0xda7cxd){return function(){return User[_0xb2af[51]](_0xb2af[50])[_0xb2af[49]]({where:{chanspy:true}})[_0xb2af[16]](function(_0xda7cx11){var _0xda7cx12=[];_0xda7cx11[_0xb2af[48]](function(_0xda7cx13){var _0xda7cx14=[];var _0xda7cx15=1;_0xda7cx14[_0xb2af[34]]({context:_0xb2af[25],exten:util[_0xb2af[29]](_0xb2af[26],_0xda7cxc[_0xb2af[27]],_0xda7cx13[_0xb2af[28]]),priority:_0xda7cx15,app:_0xb2af[30],appdata:util[_0xb2af[29]](_0xb2af[31],_0xb2af[32]),UserId:_0xda7cx13[_0xb2af[21]],ChanSpyId:_0xda7cxc[_0xb2af[21]],type:_0xb2af[33]});_0xda7cx15++;if(_0xda7cxc[_0xb2af[35]]){_0xda7cx14[_0xb2af[34]]({context:_0xb2af[25],exten:util[_0xb2af[29]](_0xb2af[26],_0xda7cxc[_0xb2af[27]],_0xda7cx13[_0xb2af[28]]),priority:_0xda7cx15,app:_0xb2af[36],appdata:_0xda7cxc[_0xb2af[37]],UserId:_0xda7cx13[_0xb2af[21]],ChanSpyId:_0xda7cxc[_0xb2af[21]],type:_0xb2af[33]});_0xda7cx15++};if(_0xda7cxc[_0xb2af[38]]&& _0xda7cxc[_0xb2af[39]]){_0xda7cx14[_0xb2af[34]]({context:_0xb2af[25],exten:util[_0xb2af[29]](_0xb2af[26],_0xda7cxc[_0xb2af[27]],_0xda7cx13[_0xb2af[28]]),priority:_0xda7cx15,app:_0xb2af[40],appdata:util[_0xb2af[29]](_0xb2af[41],_0xda7cxc[_0xb2af[39]]),UserId:_0xda7cx13[_0xb2af[21]],ChanSpyId:_0xda7cxc[_0xb2af[21]],type:_0xb2af[33]});_0xda7cx15++};_0xda7cx14[_0xb2af[34]]({context:_0xb2af[25],exten:util[_0xb2af[29]](_0xb2af[26],_0xda7cxc[_0xb2af[27]],_0xda7cx13[_0xb2af[28]]),priority:_0xda7cx15,app:_0xb2af[5],appdata:util[_0xb2af[29]](_0xb2af[42],_0xda7cx13[_0xb2af[28]],_0xda7cxc[_0xb2af[43]]),UserId:_0xda7cx13[_0xb2af[21]],ChanSpyId:_0xda7cxc[_0xb2af[21]],type:_0xb2af[33]});_0xda7cx15++;if(_0xda7cxc[_0xb2af[38]]&& _0xda7cxc[_0xb2af[39]]){_0xda7cx14[_0xb2af[34]]({context:_0xb2af[25],exten:util[_0xb2af[29]](_0xb2af[26],_0xda7cxc[_0xb2af[27]],_0xda7cx13[_0xb2af[28]]),priority:_0xda7cx15,app:_0xb2af[44],appdata:_0xb2af[45],UserId:_0xda7cx13[_0xb2af[21]],ChanSpyId:_0xda7cxc[_0xb2af[21]],type:_0xb2af[33]})};_0xda7cx15= 1;_0xda7cx14[_0xb2af[34]]({context:_0xb2af[25],exten:util[_0xb2af[29]](_0xb2af[26],_0xda7cxc[_0xb2af[27]],_0xda7cx13[_0xb2af[46]]),priority:_0xda7cx15,app:_0xb2af[30],appdata:util[_0xb2af[29]](_0xb2af[31],_0xb2af[32]),UserId:_0xda7cx13[_0xb2af[21]],ChanSpyId:_0xda7cxc[_0xb2af[21]],type:_0xb2af[33]});_0xda7cx15++;if(_0xda7cxc[_0xb2af[35]]){_0xda7cx14[_0xb2af[34]]({context:_0xb2af[25],exten:util[_0xb2af[29]](_0xb2af[26],_0xda7cxc[_0xb2af[27]],_0xda7cx13[_0xb2af[46]]),priority:_0xda7cx15,app:_0xb2af[36],appdata:_0xda7cxc[_0xb2af[37]],UserId:_0xda7cx13[_0xb2af[21]],ChanSpyId:_0xda7cxc[_0xb2af[21]],type:_0xb2af[33]});_0xda7cx15++};if(_0xda7cxc[_0xb2af[38]]&& _0xda7cxc[_0xb2af[39]]){_0xda7cx14[_0xb2af[34]]({context:_0xb2af[25],exten:util[_0xb2af[29]](_0xb2af[26],_0xda7cxc[_0xb2af[27]],_0xda7cx13[_0xb2af[46]]),priority:_0xda7cx15,app:_0xb2af[40],appdata:util[_0xb2af[29]](_0xb2af[41],_0xda7cxc[_0xb2af[39]]),UserId:_0xda7cx13[_0xb2af[21]],ChanSpyId:_0xda7cxc[_0xb2af[21]],type:_0xb2af[33]});_0xda7cx15++};_0xda7cx14[_0xb2af[34]]({context:_0xb2af[25],exten:util[_0xb2af[29]](_0xb2af[26],_0xda7cxc[_0xb2af[27]],_0xda7cx13[_0xb2af[46]]),priority:_0xda7cx15,app:_0xb2af[5],appdata:util[_0xb2af[29]](_0xb2af[42],_0xda7cx13[_0xb2af[28]],_0xda7cxc[_0xb2af[43]]),UserId:_0xda7cx13[_0xb2af[21]],ChanSpyId:_0xda7cxc[_0xb2af[21]],type:_0xb2af[33]});_0xda7cx15++;if(_0xda7cxc[_0xb2af[38]]&& _0xda7cxc[_0xb2af[39]]){_0xda7cx14[_0xb2af[34]]({context:_0xb2af[25],exten:util[_0xb2af[29]](_0xb2af[26],_0xda7cxc[_0xb2af[27]],_0xda7cx13[_0xb2af[46]]),priority:_0xda7cx15,app:_0xb2af[44],appdata:_0xb2af[45],UserId:_0xda7cx13[_0xb2af[21]],ChanSpyId:_0xda7cxc[_0xb2af[21]],type:_0xb2af[33]})};_0xda7cx12[_0xb2af[34]](VoiceExtension[_0xb2af[47]](_0xda7cx14,{transaction:_0xda7cxd[_0xb2af[22]]}))});return _0xda7cx12})[_0xb2af[24]]()}}module[_0xb2af[52]]= ChanSpy
\ No newline at end of file
+var _0x164f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x43\x68\x61\x6E\x53\x70\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x72\x65\x73\x6F\x6C\x76\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x6C\x65\x74\x65","\x69\x64","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79","\x61\x6C\x6C","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x25\x73\x25\x73","\x70\x72\x65\x66\x69\x78","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x53\x65\x74","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x25\x73","\x63\x68\x61\x6E\x73\x70\x79","\x73\x79\x73\x74\x65\x6D","\x70\x75\x73\x68","\x61\x75\x74\x68","\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x63\x6F\x72\x64","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x24\x7B\x55\x4E\x49\x51\x55\x45\x49\x44\x7D\x2E\x25\x73","\x53\x49\x50\x2F\x25\x73\x2C\x25\x73","\x6F\x70\x74\x69\x6F\x6E\x73","\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x66\x6F\x72\x45\x61\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x164f[0];var fs=require(_0x164f[1]);var util=require(_0x164f[2]);var path=require(_0x164f[3]);var config=require(_0x164f[4]);var ChanSpyModel=require(_0x164f[6])[_0x164f[5]];var User=require(_0x164f[6])[_0x164f[7]];var VoiceExtension=require(_0x164f[6])[_0x164f[8]];var sequelize=require(_0x164f[6])[_0x164f[9]];var Promise=require(_0x164f[10]);var logger=require(_0x164f[12])(_0x164f[11]);function ChanSpy(){ChanSpyModel[_0x164f[18]](function(_0xec60xc,_0xec60xd){return Promise[_0x164f[17]]()[_0x164f[16]](createSpyExtensions(_0xec60xc,_0xec60xd))[_0x164f[15]](function(_0xec60xe){logger[_0x164f[14]](_0xec60xe[_0x164f[13]])})});ChanSpyModel[_0x164f[19]](function(_0xec60xc,_0xec60xd){return Promise[_0x164f[17]]()[_0x164f[16]](deleteSpyExtensions(_0xec60xc,_0xec60xd))[_0x164f[16]](createSpyExtensions(_0xec60xc,_0xec60xd))[_0x164f[15]](function(_0xec60xe){logger[_0x164f[14]](_0xec60xe[_0x164f[13]])})});ChanSpyModel[_0x164f[20]](function(_0xec60xc,_0xec60xd){return Promise[_0x164f[17]]()[_0x164f[16]](deleteSpyExtensions(_0xec60xc,_0xec60xd))[_0x164f[15]](function(_0xec60xe){logger[_0x164f[14]](_0xec60xe[_0x164f[13]])})})}function deleteSpyExtensions(_0xec60xc,_0xec60xd){return function(){return VoiceExtension[_0x164f[23]]({where:{ChanSpyId:_0xec60xc[_0x164f[21]]},transaction:_0xec60xd[_0x164f[22]]})}}function createSpyExtensions(_0xec60xc,_0xec60xd){return function(){return User[_0x164f[51]](_0x164f[50])[_0x164f[49]]({where:{chanspy:true}})[_0x164f[16]](function(_0xec60x11){var _0xec60x12=[];_0xec60x11[_0x164f[48]](function(_0xec60x13){var _0xec60x14=[];var _0xec60x15=1;_0xec60x14[_0x164f[34]]({context:_0x164f[25],exten:util[_0x164f[29]](_0x164f[26],_0xec60xc[_0x164f[27]],_0xec60x13[_0x164f[28]]),priority:_0xec60x15,app:_0x164f[30],appdata:util[_0x164f[29]](_0x164f[31],_0x164f[32]),UserId:_0xec60x13[_0x164f[21]],ChanSpyId:_0xec60xc[_0x164f[21]],type:_0x164f[33]});_0xec60x15++;if(_0xec60xc[_0x164f[35]]){_0xec60x14[_0x164f[34]]({context:_0x164f[25],exten:util[_0x164f[29]](_0x164f[26],_0xec60xc[_0x164f[27]],_0xec60x13[_0x164f[28]]),priority:_0xec60x15,app:_0x164f[36],appdata:_0xec60xc[_0x164f[37]],UserId:_0xec60x13[_0x164f[21]],ChanSpyId:_0xec60xc[_0x164f[21]],type:_0x164f[33]});_0xec60x15++};if(_0xec60xc[_0x164f[38]]&& _0xec60xc[_0x164f[39]]){_0xec60x14[_0x164f[34]]({context:_0x164f[25],exten:util[_0x164f[29]](_0x164f[26],_0xec60xc[_0x164f[27]],_0xec60x13[_0x164f[28]]),priority:_0xec60x15,app:_0x164f[40],appdata:util[_0x164f[29]](_0x164f[41],_0xec60xc[_0x164f[39]]),UserId:_0xec60x13[_0x164f[21]],ChanSpyId:_0xec60xc[_0x164f[21]],type:_0x164f[33]});_0xec60x15++};_0xec60x14[_0x164f[34]]({context:_0x164f[25],exten:util[_0x164f[29]](_0x164f[26],_0xec60xc[_0x164f[27]],_0xec60x13[_0x164f[28]]),priority:_0xec60x15,app:_0x164f[5],appdata:util[_0x164f[29]](_0x164f[42],_0xec60x13[_0x164f[28]],_0xec60xc[_0x164f[43]]),UserId:_0xec60x13[_0x164f[21]],ChanSpyId:_0xec60xc[_0x164f[21]],type:_0x164f[33]});_0xec60x15++;if(_0xec60xc[_0x164f[38]]&& _0xec60xc[_0x164f[39]]){_0xec60x14[_0x164f[34]]({context:_0x164f[25],exten:util[_0x164f[29]](_0x164f[26],_0xec60xc[_0x164f[27]],_0xec60x13[_0x164f[28]]),priority:_0xec60x15,app:_0x164f[44],appdata:_0x164f[45],UserId:_0xec60x13[_0x164f[21]],ChanSpyId:_0xec60xc[_0x164f[21]],type:_0x164f[33]})};_0xec60x15= 1;_0xec60x14[_0x164f[34]]({context:_0x164f[25],exten:util[_0x164f[29]](_0x164f[26],_0xec60xc[_0x164f[27]],_0xec60x13[_0x164f[46]]),priority:_0xec60x15,app:_0x164f[30],appdata:util[_0x164f[29]](_0x164f[31],_0x164f[32]),UserId:_0xec60x13[_0x164f[21]],ChanSpyId:_0xec60xc[_0x164f[21]],type:_0x164f[33]});_0xec60x15++;if(_0xec60xc[_0x164f[35]]){_0xec60x14[_0x164f[34]]({context:_0x164f[25],exten:util[_0x164f[29]](_0x164f[26],_0xec60xc[_0x164f[27]],_0xec60x13[_0x164f[46]]),priority:_0xec60x15,app:_0x164f[36],appdata:_0xec60xc[_0x164f[37]],UserId:_0xec60x13[_0x164f[21]],ChanSpyId:_0xec60xc[_0x164f[21]],type:_0x164f[33]});_0xec60x15++};if(_0xec60xc[_0x164f[38]]&& _0xec60xc[_0x164f[39]]){_0xec60x14[_0x164f[34]]({context:_0x164f[25],exten:util[_0x164f[29]](_0x164f[26],_0xec60xc[_0x164f[27]],_0xec60x13[_0x164f[46]]),priority:_0xec60x15,app:_0x164f[40],appdata:util[_0x164f[29]](_0x164f[41],_0xec60xc[_0x164f[39]]),UserId:_0xec60x13[_0x164f[21]],ChanSpyId:_0xec60xc[_0x164f[21]],type:_0x164f[33]});_0xec60x15++};_0xec60x14[_0x164f[34]]({context:_0x164f[25],exten:util[_0x164f[29]](_0x164f[26],_0xec60xc[_0x164f[27]],_0xec60x13[_0x164f[46]]),priority:_0xec60x15,app:_0x164f[5],appdata:util[_0x164f[29]](_0x164f[42],_0xec60x13[_0x164f[28]],_0xec60xc[_0x164f[43]]),UserId:_0xec60x13[_0x164f[21]],ChanSpyId:_0xec60xc[_0x164f[21]],type:_0x164f[33]});_0xec60x15++;if(_0xec60xc[_0x164f[38]]&& _0xec60xc[_0x164f[39]]){_0xec60x14[_0x164f[34]]({context:_0x164f[25],exten:util[_0x164f[29]](_0x164f[26],_0xec60xc[_0x164f[27]],_0xec60x13[_0x164f[46]]),priority:_0xec60x15,app:_0x164f[44],appdata:_0x164f[45],UserId:_0xec60x13[_0x164f[21]],ChanSpyId:_0xec60xc[_0x164f[21]],type:_0x164f[33]})};_0xec60x12[_0x164f[34]](VoiceExtension[_0x164f[47]](_0xec60x14,{transaction:_0xec60xd[_0x164f[22]]}))});return _0xec60x12})[_0x164f[24]]()}}module[_0x164f[52]]= ChanSpy
\ No newline at end of file