e8802811f449c67fa01d42a07596c74634819922
[motion.git] / server / config / sms / skebby.js
1 var _0x9de7=["\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x68\x74\x74\x70\x73","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x74\x65\x78\x74","\x73\x65\x6E\x64\x65\x72\x5F\x6E\x75\x6D\x62\x65\x72","","\x73\x65\x6E\x64\x65\x72\x5F\x73\x74\x72\x69\x6E\x67","\x6D\x65\x74\x68\x6F\x64","\x72\x65\x63\x69\x70\x69\x65\x6E\x74\x73","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x65\x6E\x64\x5F\x73\x6D\x73\x5F\x63\x6C\x61\x73\x73\x69\x63","\x63\x6C\x61\x73\x73\x69\x63","\x73\x65\x6E\x64\x5F\x73\x6D\x73\x5F\x63\x6C\x61\x73\x73\x69\x63\x5F\x72\x65\x70\x6F\x72\x74","\x63\x6C\x61\x73\x73\x69\x63\x2B","\x73\x65\x6E\x64\x5F\x73\x6D\x73\x5F\x62\x61\x73\x69\x63","\x62\x61\x73\x69\x63","\x74\x65\x73\x74","\x74\x65\x73\x74\x5F","\x55\x54\x46\x2D\x38","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x2F\x61\x70\x69\x2F\x73\x65\x6E\x64\x2F\x73\x6D\x73\x65\x61\x73\x79\x2F\x61\x64\x76\x61\x6E\x63\x65\x64\x2F\x68\x74\x74\x70\x2E\x70\x68\x70","\x67\x61\x74\x65\x77\x61\x79\x2E\x73\x6B\x65\x62\x62\x79\x2E\x69\x74","\x50\x4F\x53\x54","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x6C\x65\x6E\x67\x74\x68","\x75\x74\x66\x38","\x64\x61\x74\x61","\x6F\x6E","\x65\x6E\x64","\x70\x61\x72\x73\x65","\x73\x74\x61\x74\x75\x73","\x73\x75\x63\x63\x65\x73\x73","\x72\x65\x71\x75\x65\x73\x74","\x65\x72\x72\x6F\x72","\x73\x6D\x73\x74\x79\x70\x65","\x66\x72\x6F\x6D","\x2B","\x72\x65\x70\x6C\x61\x63\x65","\x74\x6F","\x62\x6F\x64\x79","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x65\x78\x70\x6F\x72\x74\x73"];var qs=require(_0x9de7[0]);var https=require(_0x9de7[1]);var rp=require(_0x9de7[2]);var Promise=require(_0x9de7[3]);var skebbyMessage=function(_0x8ca3x6,_0x8ca3x7){var _0x8ca3x8=_0x8ca3x6[_0x9de7[4]];var _0x8ca3x9=_0x8ca3x6[_0x9de7[5]]|| _0x9de7[6];var _0x8ca3xa=_0x8ca3x6[_0x9de7[7]]|| _0x9de7[6];var _0x8ca3xb=_0x8ca3x6[_0x9de7[8]];var _0x8ca3xc=_0x8ca3x6[_0x9de7[9]]|| [];var _0x8ca3xd=_0x8ca3x6[_0x9de7[10]];var _0x8ca3xe=_0x8ca3x6[_0x9de7[11]];switch(_0x8ca3xb){case _0x9de7[13]:_0x8ca3xb= _0x9de7[12];break;case _0x9de7[15]:_0x8ca3xb= _0x9de7[14];break;case _0x9de7[17]:_0x8ca3xb= _0x9de7[16];break;default:_0x8ca3xb= _0x9de7[16]};if(_0x8ca3x6[_0x9de7[18]]){_0x8ca3xb= _0x9de7[19]+ _0x8ca3xb};var _0x8ca3xf={method:_0x8ca3xb,username:_0x8ca3xd,password:_0x8ca3xe,"\x72\x65\x63\x69\x70\x69\x65\x6E\x74\x73\x5B\x5D":_0x8ca3xc,text:_0x8ca3x8,charset:_0x9de7[20]};if(_0x8ca3x9){_0x8ca3xf[_0x9de7[5]]= _0x8ca3x9}else {if(_0x8ca3xa){_0x8ca3xf[_0x9de7[7]]= _0x8ca3xa}};var _0x8ca3x10=false;var _0x8ca3x11=qs[_0x9de7[21]](_0x8ca3xf);var _0x8ca3x12=https[_0x9de7[34]]({port:443,path:_0x9de7[22],host:_0x9de7[23],method:_0x9de7[24],headers:{"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x9de7[25],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68":_0x8ca3x11[_0x9de7[26]],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67":_0x9de7[27]}},function(_0x8ca3x13){var _0x8ca3x14=_0x9de7[6];_0x8ca3x13[_0x9de7[29]](_0x9de7[28],function(_0x8ca3x11){_0x8ca3x14+= _0x8ca3x11});_0x8ca3x13[_0x9de7[29]](_0x9de7[30],function(){if(!_0x8ca3x10){var _0x8ca3x15=qs[_0x9de7[31]](_0x8ca3x14);if(_0x8ca3x15[_0x9de7[32]]== _0x9de7[33]){_0x8ca3x7(null,{data:_0x8ca3x15})}else {_0x8ca3x7(_0x8ca3x15)};_0x8ca3x10= true}})});_0x8ca3x12[_0x9de7[30]](_0x8ca3x11);_0x8ca3x12[_0x9de7[29]](_0x9de7[35],function(_0x8ca3x16){if(!_0x8ca3x10){_0x8ca3x7(_0x8ca3x16);_0x8ca3x10= true}})};var sendMessage=function(_0x8ca3x18,_0x8ca3x19){var _0x8ca3x1a={method:_0x8ca3x19[_0x9de7[36]],test:_0x8ca3x18[_0x9de7[18]],username:_0x8ca3x19[_0x9de7[10]],password:_0x8ca3x19[_0x9de7[11]],sender_number:/^[\+][0-9]+$/[_0x9de7[18]](_0x8ca3x18[_0x9de7[37]])?_0x8ca3x18[_0x9de7[37]][_0x9de7[39]](_0x9de7[38],_0x9de7[6]):_0x8ca3x18[_0x9de7[37]],recipients:/^[\+][0-9]+$/[_0x9de7[18]](_0x8ca3x18[_0x9de7[40]])?_0x8ca3x18[_0x9de7[40]][_0x9de7[39]](_0x9de7[38],_0x9de7[6]):_0x8ca3x18[_0x9de7[40]],text:_0x8ca3x18[_0x9de7[41]]};var _0x8ca3x1b=Promise[_0x9de7[42]](skebbyMessage);return _0x8ca3x1b(_0x8ca3x1a)};module[_0x9de7[44]][_0x9de7[43]]= sendMessage