Built motion from commit eeb7beacd.|1.0.21
[motion.git] / server / config / tools / channelSpy.js
index 256c59c..9914aa2 100644 (file)
@@ -1 +1 @@
-var _0xfb71=["\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"];_0xfb71[0];var fs=require(_0xfb71[1]);var util=require(_0xfb71[2]);var path=require(_0xfb71[3]);var config=require(_0xfb71[4]);var ChanSpyModel=require(_0xfb71[6])[_0xfb71[5]];var User=require(_0xfb71[6])[_0xfb71[7]];var VoiceExtension=require(_0xfb71[6])[_0xfb71[8]];var sequelize=require(_0xfb71[6])[_0xfb71[9]];var Promise=require(_0xfb71[10]);var logger=require(_0xfb71[12])(_0xfb71[11]);function ChanSpy(){ChanSpyModel[_0xfb71[18]](function(_0x68efxc,_0x68efxd){return Promise[_0xfb71[17]]()[_0xfb71[16]](createSpyExtensions(_0x68efxc,_0x68efxd))[_0xfb71[15]](function(_0x68efxe){logger[_0xfb71[14]](_0x68efxe[_0xfb71[13]])})});ChanSpyModel[_0xfb71[19]](function(_0x68efxc,_0x68efxd){return Promise[_0xfb71[17]]()[_0xfb71[16]](deleteSpyExtensions(_0x68efxc,_0x68efxd))[_0xfb71[16]](createSpyExtensions(_0x68efxc,_0x68efxd))[_0xfb71[15]](function(_0x68efxe){logger[_0xfb71[14]](_0x68efxe[_0xfb71[13]])})});ChanSpyModel[_0xfb71[20]](function(_0x68efxc,_0x68efxd){return Promise[_0xfb71[17]]()[_0xfb71[16]](deleteSpyExtensions(_0x68efxc,_0x68efxd))[_0xfb71[15]](function(_0x68efxe){logger[_0xfb71[14]](_0x68efxe[_0xfb71[13]])})})}function deleteSpyExtensions(_0x68efxc,_0x68efxd){return function(){return VoiceExtension[_0xfb71[23]]({where:{ChanSpyId:_0x68efxc[_0xfb71[21]]},transaction:_0x68efxd[_0xfb71[22]]})}}function createSpyExtensions(_0x68efxc,_0x68efxd){return function(){return User[_0xfb71[51]](_0xfb71[50])[_0xfb71[49]]({where:{chanspy:true}})[_0xfb71[16]](function(_0x68efx11){var _0x68efx12=[];_0x68efx11[_0xfb71[48]](function(_0x68efx13){var _0x68efx14=[];var _0x68efx15=1;_0x68efx14[_0xfb71[34]]({context:_0xfb71[25],exten:util[_0xfb71[29]](_0xfb71[26],_0x68efxc[_0xfb71[27]],_0x68efx13[_0xfb71[28]]),priority:_0x68efx15,app:_0xfb71[30],appdata:util[_0xfb71[29]](_0xfb71[31],_0xfb71[32]),UserId:_0x68efx13[_0xfb71[21]],ChanSpyId:_0x68efxc[_0xfb71[21]],type:_0xfb71[33]});_0x68efx15++;if(_0x68efxc[_0xfb71[35]]){_0x68efx14[_0xfb71[34]]({context:_0xfb71[25],exten:util[_0xfb71[29]](_0xfb71[26],_0x68efxc[_0xfb71[27]],_0x68efx13[_0xfb71[28]]),priority:_0x68efx15,app:_0xfb71[36],appdata:_0x68efxc[_0xfb71[37]],UserId:_0x68efx13[_0xfb71[21]],ChanSpyId:_0x68efxc[_0xfb71[21]],type:_0xfb71[33]});_0x68efx15++};if(_0x68efxc[_0xfb71[38]]&& _0x68efxc[_0xfb71[39]]){_0x68efx14[_0xfb71[34]]({context:_0xfb71[25],exten:util[_0xfb71[29]](_0xfb71[26],_0x68efxc[_0xfb71[27]],_0x68efx13[_0xfb71[28]]),priority:_0x68efx15,app:_0xfb71[40],appdata:util[_0xfb71[29]](_0xfb71[41],_0x68efxc[_0xfb71[39]]),UserId:_0x68efx13[_0xfb71[21]],ChanSpyId:_0x68efxc[_0xfb71[21]],type:_0xfb71[33]});_0x68efx15++};_0x68efx14[_0xfb71[34]]({context:_0xfb71[25],exten:util[_0xfb71[29]](_0xfb71[26],_0x68efxc[_0xfb71[27]],_0x68efx13[_0xfb71[28]]),priority:_0x68efx15,app:_0xfb71[5],appdata:util[_0xfb71[29]](_0xfb71[42],_0x68efx13[_0xfb71[28]],_0x68efxc[_0xfb71[43]]),UserId:_0x68efx13[_0xfb71[21]],ChanSpyId:_0x68efxc[_0xfb71[21]],type:_0xfb71[33]});_0x68efx15++;if(_0x68efxc[_0xfb71[38]]&& _0x68efxc[_0xfb71[39]]){_0x68efx14[_0xfb71[34]]({context:_0xfb71[25],exten:util[_0xfb71[29]](_0xfb71[26],_0x68efxc[_0xfb71[27]],_0x68efx13[_0xfb71[28]]),priority:_0x68efx15,app:_0xfb71[44],appdata:_0xfb71[45],UserId:_0x68efx13[_0xfb71[21]],ChanSpyId:_0x68efxc[_0xfb71[21]],type:_0xfb71[33]})};_0x68efx15= 1;_0x68efx14[_0xfb71[34]]({context:_0xfb71[25],exten:util[_0xfb71[29]](_0xfb71[26],_0x68efxc[_0xfb71[27]],_0x68efx13[_0xfb71[46]]),priority:_0x68efx15,app:_0xfb71[30],appdata:util[_0xfb71[29]](_0xfb71[31],_0xfb71[32]),UserId:_0x68efx13[_0xfb71[21]],ChanSpyId:_0x68efxc[_0xfb71[21]],type:_0xfb71[33]});_0x68efx15++;if(_0x68efxc[_0xfb71[35]]){_0x68efx14[_0xfb71[34]]({context:_0xfb71[25],exten:util[_0xfb71[29]](_0xfb71[26],_0x68efxc[_0xfb71[27]],_0x68efx13[_0xfb71[46]]),priority:_0x68efx15,app:_0xfb71[36],appdata:_0x68efxc[_0xfb71[37]],UserId:_0x68efx13[_0xfb71[21]],ChanSpyId:_0x68efxc[_0xfb71[21]],type:_0xfb71[33]});_0x68efx15++};if(_0x68efxc[_0xfb71[38]]&& _0x68efxc[_0xfb71[39]]){_0x68efx14[_0xfb71[34]]({context:_0xfb71[25],exten:util[_0xfb71[29]](_0xfb71[26],_0x68efxc[_0xfb71[27]],_0x68efx13[_0xfb71[46]]),priority:_0x68efx15,app:_0xfb71[40],appdata:util[_0xfb71[29]](_0xfb71[41],_0x68efxc[_0xfb71[39]]),UserId:_0x68efx13[_0xfb71[21]],ChanSpyId:_0x68efxc[_0xfb71[21]],type:_0xfb71[33]});_0x68efx15++};_0x68efx14[_0xfb71[34]]({context:_0xfb71[25],exten:util[_0xfb71[29]](_0xfb71[26],_0x68efxc[_0xfb71[27]],_0x68efx13[_0xfb71[46]]),priority:_0x68efx15,app:_0xfb71[5],appdata:util[_0xfb71[29]](_0xfb71[42],_0x68efx13[_0xfb71[28]],_0x68efxc[_0xfb71[43]]),UserId:_0x68efx13[_0xfb71[21]],ChanSpyId:_0x68efxc[_0xfb71[21]],type:_0xfb71[33]});_0x68efx15++;if(_0x68efxc[_0xfb71[38]]&& _0x68efxc[_0xfb71[39]]){_0x68efx14[_0xfb71[34]]({context:_0xfb71[25],exten:util[_0xfb71[29]](_0xfb71[26],_0x68efxc[_0xfb71[27]],_0x68efx13[_0xfb71[46]]),priority:_0x68efx15,app:_0xfb71[44],appdata:_0xfb71[45],UserId:_0x68efx13[_0xfb71[21]],ChanSpyId:_0x68efxc[_0xfb71[21]],type:_0xfb71[33]})};_0x68efx12[_0xfb71[34]](VoiceExtension[_0xfb71[47]](_0x68efx14,{transaction:_0x68efxd[_0xfb71[22]]}))});return _0x68efx12})[_0xfb71[24]]()}}module[_0xfb71[52]]= ChanSpy
\ No newline at end of file
+var _0xe5dc=["\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"];_0xe5dc[0];var fs=require(_0xe5dc[1]);var util=require(_0xe5dc[2]);var path=require(_0xe5dc[3]);var config=require(_0xe5dc[4]);var ChanSpyModel=require(_0xe5dc[6])[_0xe5dc[5]];var User=require(_0xe5dc[6])[_0xe5dc[7]];var VoiceExtension=require(_0xe5dc[6])[_0xe5dc[8]];var sequelize=require(_0xe5dc[6])[_0xe5dc[9]];var Promise=require(_0xe5dc[10]);var logger=require(_0xe5dc[12])(_0xe5dc[11]);function ChanSpy(){ChanSpyModel[_0xe5dc[18]](function(_0xd5dcxc,_0xd5dcxd){return Promise[_0xe5dc[17]]()[_0xe5dc[16]](createSpyExtensions(_0xd5dcxc,_0xd5dcxd))[_0xe5dc[15]](function(_0xd5dcxe){logger[_0xe5dc[14]](_0xd5dcxe[_0xe5dc[13]])})});ChanSpyModel[_0xe5dc[19]](function(_0xd5dcxc,_0xd5dcxd){return Promise[_0xe5dc[17]]()[_0xe5dc[16]](deleteSpyExtensions(_0xd5dcxc,_0xd5dcxd))[_0xe5dc[16]](createSpyExtensions(_0xd5dcxc,_0xd5dcxd))[_0xe5dc[15]](function(_0xd5dcxe){logger[_0xe5dc[14]](_0xd5dcxe[_0xe5dc[13]])})});ChanSpyModel[_0xe5dc[20]](function(_0xd5dcxc,_0xd5dcxd){return Promise[_0xe5dc[17]]()[_0xe5dc[16]](deleteSpyExtensions(_0xd5dcxc,_0xd5dcxd))[_0xe5dc[15]](function(_0xd5dcxe){logger[_0xe5dc[14]](_0xd5dcxe[_0xe5dc[13]])})})}function deleteSpyExtensions(_0xd5dcxc,_0xd5dcxd){return function(){return VoiceExtension[_0xe5dc[23]]({where:{ChanSpyId:_0xd5dcxc[_0xe5dc[21]]},transaction:_0xd5dcxd[_0xe5dc[22]]})}}function createSpyExtensions(_0xd5dcxc,_0xd5dcxd){return function(){return User[_0xe5dc[51]](_0xe5dc[50])[_0xe5dc[49]]({where:{chanspy:true}})[_0xe5dc[16]](function(_0xd5dcx11){var _0xd5dcx12=[];_0xd5dcx11[_0xe5dc[48]](function(_0xd5dcx13){var _0xd5dcx14=[];var _0xd5dcx15=1;_0xd5dcx14[_0xe5dc[34]]({context:_0xe5dc[25],exten:util[_0xe5dc[29]](_0xe5dc[26],_0xd5dcxc[_0xe5dc[27]],_0xd5dcx13[_0xe5dc[28]]),priority:_0xd5dcx15,app:_0xe5dc[30],appdata:util[_0xe5dc[29]](_0xe5dc[31],_0xe5dc[32]),UserId:_0xd5dcx13[_0xe5dc[21]],ChanSpyId:_0xd5dcxc[_0xe5dc[21]],type:_0xe5dc[33]});_0xd5dcx15++;if(_0xd5dcxc[_0xe5dc[35]]){_0xd5dcx14[_0xe5dc[34]]({context:_0xe5dc[25],exten:util[_0xe5dc[29]](_0xe5dc[26],_0xd5dcxc[_0xe5dc[27]],_0xd5dcx13[_0xe5dc[28]]),priority:_0xd5dcx15,app:_0xe5dc[36],appdata:_0xd5dcxc[_0xe5dc[37]],UserId:_0xd5dcx13[_0xe5dc[21]],ChanSpyId:_0xd5dcxc[_0xe5dc[21]],type:_0xe5dc[33]});_0xd5dcx15++};if(_0xd5dcxc[_0xe5dc[38]]&& _0xd5dcxc[_0xe5dc[39]]){_0xd5dcx14[_0xe5dc[34]]({context:_0xe5dc[25],exten:util[_0xe5dc[29]](_0xe5dc[26],_0xd5dcxc[_0xe5dc[27]],_0xd5dcx13[_0xe5dc[28]]),priority:_0xd5dcx15,app:_0xe5dc[40],appdata:util[_0xe5dc[29]](_0xe5dc[41],_0xd5dcxc[_0xe5dc[39]]),UserId:_0xd5dcx13[_0xe5dc[21]],ChanSpyId:_0xd5dcxc[_0xe5dc[21]],type:_0xe5dc[33]});_0xd5dcx15++};_0xd5dcx14[_0xe5dc[34]]({context:_0xe5dc[25],exten:util[_0xe5dc[29]](_0xe5dc[26],_0xd5dcxc[_0xe5dc[27]],_0xd5dcx13[_0xe5dc[28]]),priority:_0xd5dcx15,app:_0xe5dc[5],appdata:util[_0xe5dc[29]](_0xe5dc[42],_0xd5dcx13[_0xe5dc[28]],_0xd5dcxc[_0xe5dc[43]]),UserId:_0xd5dcx13[_0xe5dc[21]],ChanSpyId:_0xd5dcxc[_0xe5dc[21]],type:_0xe5dc[33]});_0xd5dcx15++;if(_0xd5dcxc[_0xe5dc[38]]&& _0xd5dcxc[_0xe5dc[39]]){_0xd5dcx14[_0xe5dc[34]]({context:_0xe5dc[25],exten:util[_0xe5dc[29]](_0xe5dc[26],_0xd5dcxc[_0xe5dc[27]],_0xd5dcx13[_0xe5dc[28]]),priority:_0xd5dcx15,app:_0xe5dc[44],appdata:_0xe5dc[45],UserId:_0xd5dcx13[_0xe5dc[21]],ChanSpyId:_0xd5dcxc[_0xe5dc[21]],type:_0xe5dc[33]})};_0xd5dcx15= 1;_0xd5dcx14[_0xe5dc[34]]({context:_0xe5dc[25],exten:util[_0xe5dc[29]](_0xe5dc[26],_0xd5dcxc[_0xe5dc[27]],_0xd5dcx13[_0xe5dc[46]]),priority:_0xd5dcx15,app:_0xe5dc[30],appdata:util[_0xe5dc[29]](_0xe5dc[31],_0xe5dc[32]),UserId:_0xd5dcx13[_0xe5dc[21]],ChanSpyId:_0xd5dcxc[_0xe5dc[21]],type:_0xe5dc[33]});_0xd5dcx15++;if(_0xd5dcxc[_0xe5dc[35]]){_0xd5dcx14[_0xe5dc[34]]({context:_0xe5dc[25],exten:util[_0xe5dc[29]](_0xe5dc[26],_0xd5dcxc[_0xe5dc[27]],_0xd5dcx13[_0xe5dc[46]]),priority:_0xd5dcx15,app:_0xe5dc[36],appdata:_0xd5dcxc[_0xe5dc[37]],UserId:_0xd5dcx13[_0xe5dc[21]],ChanSpyId:_0xd5dcxc[_0xe5dc[21]],type:_0xe5dc[33]});_0xd5dcx15++};if(_0xd5dcxc[_0xe5dc[38]]&& _0xd5dcxc[_0xe5dc[39]]){_0xd5dcx14[_0xe5dc[34]]({context:_0xe5dc[25],exten:util[_0xe5dc[29]](_0xe5dc[26],_0xd5dcxc[_0xe5dc[27]],_0xd5dcx13[_0xe5dc[46]]),priority:_0xd5dcx15,app:_0xe5dc[40],appdata:util[_0xe5dc[29]](_0xe5dc[41],_0xd5dcxc[_0xe5dc[39]]),UserId:_0xd5dcx13[_0xe5dc[21]],ChanSpyId:_0xd5dcxc[_0xe5dc[21]],type:_0xe5dc[33]});_0xd5dcx15++};_0xd5dcx14[_0xe5dc[34]]({context:_0xe5dc[25],exten:util[_0xe5dc[29]](_0xe5dc[26],_0xd5dcxc[_0xe5dc[27]],_0xd5dcx13[_0xe5dc[46]]),priority:_0xd5dcx15,app:_0xe5dc[5],appdata:util[_0xe5dc[29]](_0xe5dc[42],_0xd5dcx13[_0xe5dc[28]],_0xd5dcxc[_0xe5dc[43]]),UserId:_0xd5dcx13[_0xe5dc[21]],ChanSpyId:_0xd5dcxc[_0xe5dc[21]],type:_0xe5dc[33]});_0xd5dcx15++;if(_0xd5dcxc[_0xe5dc[38]]&& _0xd5dcxc[_0xe5dc[39]]){_0xd5dcx14[_0xe5dc[34]]({context:_0xe5dc[25],exten:util[_0xe5dc[29]](_0xe5dc[26],_0xd5dcxc[_0xe5dc[27]],_0xd5dcx13[_0xe5dc[46]]),priority:_0xd5dcx15,app:_0xe5dc[44],appdata:_0xe5dc[45],UserId:_0xd5dcx13[_0xe5dc[21]],ChanSpyId:_0xd5dcxc[_0xe5dc[21]],type:_0xe5dc[33]})};_0xd5dcx12[_0xe5dc[34]](VoiceExtension[_0xe5dc[47]](_0xd5dcx14,{transaction:_0xd5dcxd[_0xe5dc[22]]}))});return _0xd5dcx12})[_0xe5dc[24]]()}}module[_0xe5dc[52]]= ChanSpy
\ No newline at end of file