Built motion from commit 822e0ac2e.|1.0.30
[motion.git] / server / config / tools / channelSpy.js
index 3546e8e..a3d8027 100644 (file)
@@ -1 +1 @@
-var _0xade0=["\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"];_0xade0[0];var fs=require(_0xade0[1]);var util=require(_0xade0[2]);var path=require(_0xade0[3]);var config=require(_0xade0[4]);var ChanSpyModel=require(_0xade0[6])[_0xade0[5]];var User=require(_0xade0[6])[_0xade0[7]];var VoiceExtension=require(_0xade0[6])[_0xade0[8]];var sequelize=require(_0xade0[6])[_0xade0[9]];var Promise=require(_0xade0[10]);var logger=require(_0xade0[12])(_0xade0[11]);function ChanSpy(){ChanSpyModel[_0xade0[18]](function(_0x8d58xc,_0x8d58xd){return Promise[_0xade0[17]]()[_0xade0[16]](createSpyExtensions(_0x8d58xc,_0x8d58xd))[_0xade0[15]](function(_0x8d58xe){logger[_0xade0[14]](_0x8d58xe[_0xade0[13]])})});ChanSpyModel[_0xade0[19]](function(_0x8d58xc,_0x8d58xd){return Promise[_0xade0[17]]()[_0xade0[16]](deleteSpyExtensions(_0x8d58xc,_0x8d58xd))[_0xade0[16]](createSpyExtensions(_0x8d58xc,_0x8d58xd))[_0xade0[15]](function(_0x8d58xe){logger[_0xade0[14]](_0x8d58xe[_0xade0[13]])})});ChanSpyModel[_0xade0[20]](function(_0x8d58xc,_0x8d58xd){return Promise[_0xade0[17]]()[_0xade0[16]](deleteSpyExtensions(_0x8d58xc,_0x8d58xd))[_0xade0[15]](function(_0x8d58xe){logger[_0xade0[14]](_0x8d58xe[_0xade0[13]])})})}function deleteSpyExtensions(_0x8d58xc,_0x8d58xd){return function(){return VoiceExtension[_0xade0[23]]({where:{ChanSpyId:_0x8d58xc[_0xade0[21]]},transaction:_0x8d58xd[_0xade0[22]]})}}function createSpyExtensions(_0x8d58xc,_0x8d58xd){return function(){return User[_0xade0[51]](_0xade0[50])[_0xade0[49]]({where:{chanspy:true}})[_0xade0[16]](function(_0x8d58x11){var _0x8d58x12=[];_0x8d58x11[_0xade0[48]](function(_0x8d58x13){var _0x8d58x14=[];var _0x8d58x15=1;_0x8d58x14[_0xade0[34]]({context:_0xade0[25],exten:util[_0xade0[29]](_0xade0[26],_0x8d58xc[_0xade0[27]],_0x8d58x13[_0xade0[28]]),priority:_0x8d58x15,app:_0xade0[30],appdata:util[_0xade0[29]](_0xade0[31],_0xade0[32]),UserId:_0x8d58x13[_0xade0[21]],ChanSpyId:_0x8d58xc[_0xade0[21]],type:_0xade0[33]});_0x8d58x15++;if(_0x8d58xc[_0xade0[35]]){_0x8d58x14[_0xade0[34]]({context:_0xade0[25],exten:util[_0xade0[29]](_0xade0[26],_0x8d58xc[_0xade0[27]],_0x8d58x13[_0xade0[28]]),priority:_0x8d58x15,app:_0xade0[36],appdata:_0x8d58xc[_0xade0[37]],UserId:_0x8d58x13[_0xade0[21]],ChanSpyId:_0x8d58xc[_0xade0[21]],type:_0xade0[33]});_0x8d58x15++};if(_0x8d58xc[_0xade0[38]]&& _0x8d58xc[_0xade0[39]]){_0x8d58x14[_0xade0[34]]({context:_0xade0[25],exten:util[_0xade0[29]](_0xade0[26],_0x8d58xc[_0xade0[27]],_0x8d58x13[_0xade0[28]]),priority:_0x8d58x15,app:_0xade0[40],appdata:util[_0xade0[29]](_0xade0[41],_0x8d58xc[_0xade0[39]]),UserId:_0x8d58x13[_0xade0[21]],ChanSpyId:_0x8d58xc[_0xade0[21]],type:_0xade0[33]});_0x8d58x15++};_0x8d58x14[_0xade0[34]]({context:_0xade0[25],exten:util[_0xade0[29]](_0xade0[26],_0x8d58xc[_0xade0[27]],_0x8d58x13[_0xade0[28]]),priority:_0x8d58x15,app:_0xade0[5],appdata:util[_0xade0[29]](_0xade0[42],_0x8d58x13[_0xade0[28]],_0x8d58xc[_0xade0[43]]),UserId:_0x8d58x13[_0xade0[21]],ChanSpyId:_0x8d58xc[_0xade0[21]],type:_0xade0[33]});_0x8d58x15++;if(_0x8d58xc[_0xade0[38]]&& _0x8d58xc[_0xade0[39]]){_0x8d58x14[_0xade0[34]]({context:_0xade0[25],exten:util[_0xade0[29]](_0xade0[26],_0x8d58xc[_0xade0[27]],_0x8d58x13[_0xade0[28]]),priority:_0x8d58x15,app:_0xade0[44],appdata:_0xade0[45],UserId:_0x8d58x13[_0xade0[21]],ChanSpyId:_0x8d58xc[_0xade0[21]],type:_0xade0[33]})};_0x8d58x15= 1;_0x8d58x14[_0xade0[34]]({context:_0xade0[25],exten:util[_0xade0[29]](_0xade0[26],_0x8d58xc[_0xade0[27]],_0x8d58x13[_0xade0[46]]),priority:_0x8d58x15,app:_0xade0[30],appdata:util[_0xade0[29]](_0xade0[31],_0xade0[32]),UserId:_0x8d58x13[_0xade0[21]],ChanSpyId:_0x8d58xc[_0xade0[21]],type:_0xade0[33]});_0x8d58x15++;if(_0x8d58xc[_0xade0[35]]){_0x8d58x14[_0xade0[34]]({context:_0xade0[25],exten:util[_0xade0[29]](_0xade0[26],_0x8d58xc[_0xade0[27]],_0x8d58x13[_0xade0[46]]),priority:_0x8d58x15,app:_0xade0[36],appdata:_0x8d58xc[_0xade0[37]],UserId:_0x8d58x13[_0xade0[21]],ChanSpyId:_0x8d58xc[_0xade0[21]],type:_0xade0[33]});_0x8d58x15++};if(_0x8d58xc[_0xade0[38]]&& _0x8d58xc[_0xade0[39]]){_0x8d58x14[_0xade0[34]]({context:_0xade0[25],exten:util[_0xade0[29]](_0xade0[26],_0x8d58xc[_0xade0[27]],_0x8d58x13[_0xade0[46]]),priority:_0x8d58x15,app:_0xade0[40],appdata:util[_0xade0[29]](_0xade0[41],_0x8d58xc[_0xade0[39]]),UserId:_0x8d58x13[_0xade0[21]],ChanSpyId:_0x8d58xc[_0xade0[21]],type:_0xade0[33]});_0x8d58x15++};_0x8d58x14[_0xade0[34]]({context:_0xade0[25],exten:util[_0xade0[29]](_0xade0[26],_0x8d58xc[_0xade0[27]],_0x8d58x13[_0xade0[46]]),priority:_0x8d58x15,app:_0xade0[5],appdata:util[_0xade0[29]](_0xade0[42],_0x8d58x13[_0xade0[28]],_0x8d58xc[_0xade0[43]]),UserId:_0x8d58x13[_0xade0[21]],ChanSpyId:_0x8d58xc[_0xade0[21]],type:_0xade0[33]});_0x8d58x15++;if(_0x8d58xc[_0xade0[38]]&& _0x8d58xc[_0xade0[39]]){_0x8d58x14[_0xade0[34]]({context:_0xade0[25],exten:util[_0xade0[29]](_0xade0[26],_0x8d58xc[_0xade0[27]],_0x8d58x13[_0xade0[46]]),priority:_0x8d58x15,app:_0xade0[44],appdata:_0xade0[45],UserId:_0x8d58x13[_0xade0[21]],ChanSpyId:_0x8d58xc[_0xade0[21]],type:_0xade0[33]})};_0x8d58x12[_0xade0[34]](VoiceExtension[_0xade0[47]](_0x8d58x14,{transaction:_0x8d58xd[_0xade0[22]]}))});return _0x8d58x12})[_0xade0[24]]()}}module[_0xade0[52]]= ChanSpy
\ No newline at end of file
+var _0xd6c0=["\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"];_0xd6c0[0];var fs=require(_0xd6c0[1]);var util=require(_0xd6c0[2]);var path=require(_0xd6c0[3]);var config=require(_0xd6c0[4]);var ChanSpyModel=require(_0xd6c0[6])[_0xd6c0[5]];var User=require(_0xd6c0[6])[_0xd6c0[7]];var VoiceExtension=require(_0xd6c0[6])[_0xd6c0[8]];var sequelize=require(_0xd6c0[6])[_0xd6c0[9]];var Promise=require(_0xd6c0[10]);var logger=require(_0xd6c0[12])(_0xd6c0[11]);function ChanSpy(){ChanSpyModel[_0xd6c0[18]](function(_0x8312xc,_0x8312xd){return Promise[_0xd6c0[17]]()[_0xd6c0[16]](createSpyExtensions(_0x8312xc,_0x8312xd))[_0xd6c0[15]](function(_0x8312xe){logger[_0xd6c0[14]](_0x8312xe[_0xd6c0[13]])})});ChanSpyModel[_0xd6c0[19]](function(_0x8312xc,_0x8312xd){return Promise[_0xd6c0[17]]()[_0xd6c0[16]](deleteSpyExtensions(_0x8312xc,_0x8312xd))[_0xd6c0[16]](createSpyExtensions(_0x8312xc,_0x8312xd))[_0xd6c0[15]](function(_0x8312xe){logger[_0xd6c0[14]](_0x8312xe[_0xd6c0[13]])})});ChanSpyModel[_0xd6c0[20]](function(_0x8312xc,_0x8312xd){return Promise[_0xd6c0[17]]()[_0xd6c0[16]](deleteSpyExtensions(_0x8312xc,_0x8312xd))[_0xd6c0[15]](function(_0x8312xe){logger[_0xd6c0[14]](_0x8312xe[_0xd6c0[13]])})})}function deleteSpyExtensions(_0x8312xc,_0x8312xd){return function(){return VoiceExtension[_0xd6c0[23]]({where:{ChanSpyId:_0x8312xc[_0xd6c0[21]]},transaction:_0x8312xd[_0xd6c0[22]]})}}function createSpyExtensions(_0x8312xc,_0x8312xd){return function(){return User[_0xd6c0[51]](_0xd6c0[50])[_0xd6c0[49]]({where:{chanspy:true}})[_0xd6c0[16]](function(_0x8312x11){var _0x8312x12=[];_0x8312x11[_0xd6c0[48]](function(_0x8312x13){var _0x8312x14=[];var _0x8312x15=1;_0x8312x14[_0xd6c0[34]]({context:_0xd6c0[25],exten:util[_0xd6c0[29]](_0xd6c0[26],_0x8312xc[_0xd6c0[27]],_0x8312x13[_0xd6c0[28]]),priority:_0x8312x15,app:_0xd6c0[30],appdata:util[_0xd6c0[29]](_0xd6c0[31],_0xd6c0[32]),UserId:_0x8312x13[_0xd6c0[21]],ChanSpyId:_0x8312xc[_0xd6c0[21]],type:_0xd6c0[33]});_0x8312x15++;if(_0x8312xc[_0xd6c0[35]]){_0x8312x14[_0xd6c0[34]]({context:_0xd6c0[25],exten:util[_0xd6c0[29]](_0xd6c0[26],_0x8312xc[_0xd6c0[27]],_0x8312x13[_0xd6c0[28]]),priority:_0x8312x15,app:_0xd6c0[36],appdata:_0x8312xc[_0xd6c0[37]],UserId:_0x8312x13[_0xd6c0[21]],ChanSpyId:_0x8312xc[_0xd6c0[21]],type:_0xd6c0[33]});_0x8312x15++};if(_0x8312xc[_0xd6c0[38]]&& _0x8312xc[_0xd6c0[39]]){_0x8312x14[_0xd6c0[34]]({context:_0xd6c0[25],exten:util[_0xd6c0[29]](_0xd6c0[26],_0x8312xc[_0xd6c0[27]],_0x8312x13[_0xd6c0[28]]),priority:_0x8312x15,app:_0xd6c0[40],appdata:util[_0xd6c0[29]](_0xd6c0[41],_0x8312xc[_0xd6c0[39]]),UserId:_0x8312x13[_0xd6c0[21]],ChanSpyId:_0x8312xc[_0xd6c0[21]],type:_0xd6c0[33]});_0x8312x15++};_0x8312x14[_0xd6c0[34]]({context:_0xd6c0[25],exten:util[_0xd6c0[29]](_0xd6c0[26],_0x8312xc[_0xd6c0[27]],_0x8312x13[_0xd6c0[28]]),priority:_0x8312x15,app:_0xd6c0[5],appdata:util[_0xd6c0[29]](_0xd6c0[42],_0x8312x13[_0xd6c0[28]],_0x8312xc[_0xd6c0[43]]),UserId:_0x8312x13[_0xd6c0[21]],ChanSpyId:_0x8312xc[_0xd6c0[21]],type:_0xd6c0[33]});_0x8312x15++;if(_0x8312xc[_0xd6c0[38]]&& _0x8312xc[_0xd6c0[39]]){_0x8312x14[_0xd6c0[34]]({context:_0xd6c0[25],exten:util[_0xd6c0[29]](_0xd6c0[26],_0x8312xc[_0xd6c0[27]],_0x8312x13[_0xd6c0[28]]),priority:_0x8312x15,app:_0xd6c0[44],appdata:_0xd6c0[45],UserId:_0x8312x13[_0xd6c0[21]],ChanSpyId:_0x8312xc[_0xd6c0[21]],type:_0xd6c0[33]})};_0x8312x15= 1;_0x8312x14[_0xd6c0[34]]({context:_0xd6c0[25],exten:util[_0xd6c0[29]](_0xd6c0[26],_0x8312xc[_0xd6c0[27]],_0x8312x13[_0xd6c0[46]]),priority:_0x8312x15,app:_0xd6c0[30],appdata:util[_0xd6c0[29]](_0xd6c0[31],_0xd6c0[32]),UserId:_0x8312x13[_0xd6c0[21]],ChanSpyId:_0x8312xc[_0xd6c0[21]],type:_0xd6c0[33]});_0x8312x15++;if(_0x8312xc[_0xd6c0[35]]){_0x8312x14[_0xd6c0[34]]({context:_0xd6c0[25],exten:util[_0xd6c0[29]](_0xd6c0[26],_0x8312xc[_0xd6c0[27]],_0x8312x13[_0xd6c0[46]]),priority:_0x8312x15,app:_0xd6c0[36],appdata:_0x8312xc[_0xd6c0[37]],UserId:_0x8312x13[_0xd6c0[21]],ChanSpyId:_0x8312xc[_0xd6c0[21]],type:_0xd6c0[33]});_0x8312x15++};if(_0x8312xc[_0xd6c0[38]]&& _0x8312xc[_0xd6c0[39]]){_0x8312x14[_0xd6c0[34]]({context:_0xd6c0[25],exten:util[_0xd6c0[29]](_0xd6c0[26],_0x8312xc[_0xd6c0[27]],_0x8312x13[_0xd6c0[46]]),priority:_0x8312x15,app:_0xd6c0[40],appdata:util[_0xd6c0[29]](_0xd6c0[41],_0x8312xc[_0xd6c0[39]]),UserId:_0x8312x13[_0xd6c0[21]],ChanSpyId:_0x8312xc[_0xd6c0[21]],type:_0xd6c0[33]});_0x8312x15++};_0x8312x14[_0xd6c0[34]]({context:_0xd6c0[25],exten:util[_0xd6c0[29]](_0xd6c0[26],_0x8312xc[_0xd6c0[27]],_0x8312x13[_0xd6c0[46]]),priority:_0x8312x15,app:_0xd6c0[5],appdata:util[_0xd6c0[29]](_0xd6c0[42],_0x8312x13[_0xd6c0[28]],_0x8312xc[_0xd6c0[43]]),UserId:_0x8312x13[_0xd6c0[21]],ChanSpyId:_0x8312xc[_0xd6c0[21]],type:_0xd6c0[33]});_0x8312x15++;if(_0x8312xc[_0xd6c0[38]]&& _0x8312xc[_0xd6c0[39]]){_0x8312x14[_0xd6c0[34]]({context:_0xd6c0[25],exten:util[_0xd6c0[29]](_0xd6c0[26],_0x8312xc[_0xd6c0[27]],_0x8312x13[_0xd6c0[46]]),priority:_0x8312x15,app:_0xd6c0[44],appdata:_0xd6c0[45],UserId:_0x8312x13[_0xd6c0[21]],ChanSpyId:_0x8312xc[_0xd6c0[21]],type:_0xd6c0[33]})};_0x8312x12[_0xd6c0[34]](VoiceExtension[_0xd6c0[47]](_0x8312x14,{transaction:_0x8312xd[_0xd6c0[22]]}))});return _0x8312x12})[_0xd6c0[24]]()}}module[_0xd6c0[52]]= ChanSpy
\ No newline at end of file