Built motion from commit 00bf23f6.|2.6.16
[motion2.git] / server / config / license / hardware.js
index 89557b6..85cf9e5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9f5a=['filter','family','IPv4','internal','concat','mac','address','cpus','map','model','join','createHash','update','digest','win32','replace','macAddress','ipAddress','md5','hex','substring','lodash','crypto','bimedia-machine-uuid','child_process','networkInterfaces','orderBy','length'];(function(_0x1feefe,_0x2018ad){var _0x56471a=function(_0x8745df){while(--_0x8745df){_0x1feefe['push'](_0x1feefe['shift']());}};_0x56471a(++_0x2018ad);}(_0x9f5a,0xbd));var _0xa9f5=function(_0x1f8e1d,_0x3f157e){_0x1f8e1d=_0x1f8e1d-0x0;var _0x223193=_0x9f5a[_0x1f8e1d];return _0x223193;};'use strict';var _=require(_0xa9f5('0x0'));var os=require('os');var crypto=require(_0xa9f5('0x1'));var machine=require(_0xa9f5('0x2'));var exec=require(_0xa9f5('0x3'))['execSync'];function getInterfaces(){var _0x4268b0=[];var _0x45e3f5=os[_0xa9f5('0x4')]();var _0x4eeedd=_[_0xa9f5('0x5')](_['keys'](_0x45e3f5));for(var _0x1a2b95=0x0;_0x1a2b95<_0x4eeedd[_0xa9f5('0x6')];_0x1a2b95++){var _0x49e337=_0x45e3f5[_0x4eeedd[_0x1a2b95]][_0xa9f5('0x7')](function(_0x285dad){return _0x285dad[_0xa9f5('0x8')]===_0xa9f5('0x9')&&_0x285dad[_0xa9f5('0xa')]===![];});_0x4268b0=_0x4268b0[_0xa9f5('0xb')](_0x49e337);}return _0x4268b0;}function getFirstInterface(){var _0x189ef8=_['head'](getInterfaces());return{'macAddress':_0x189ef8&&_0x189ef8[_0xa9f5('0xc')]?_0x189ef8[_0xa9f5('0xc')]:'00:00:00:00:00:00','ipAddress':_0x189ef8&&_0x189ef8[_0xa9f5('0xd')]?_0x189ef8[_0xa9f5('0xd')]:'127.0.0.1'};}exports['getFirstInterface']=getFirstInterface;function getCPUhash(){var _0x418ba3=_[_0xa9f5('0x5')](os[_0xa9f5('0xe')]()[_0xa9f5('0xf')](function(_0x4c26a8){return _0x4c26a8[_0xa9f5('0x10')];}))[_0xa9f5('0x11')](':');return crypto[_0xa9f5('0x12')]('md5')[_0xa9f5('0x13')](_0x418ba3)[_0xa9f5('0x14')]('hex');}exports['getUuid']=function(){switch(os['platform']()){case _0xa9f5('0x15'):return exec('dmidecode\x20--string\x20system-uuid',{'encoding':'utf8'})[_0xa9f5('0x16')]('\x0d\x0a','');default:var _0x131ed6=getFirstInterface();var _0x44f5e4=getCPUhash();var _0x415f12=_0x44f5e4+'|'+os['hostname']()+'|'+_0x131ed6[_0xa9f5('0x17')]+'|'+_0x131ed6[_0xa9f5('0x18')];var _0x230fc2=crypto[_0xa9f5('0x12')](_0xa9f5('0x19'))[_0xa9f5('0x13')](_0x415f12)[_0xa9f5('0x14')](_0xa9f5('0x1a'));return _0x230fc2[_0xa9f5('0x1b')](0x0,0x8)+'-'+_0x230fc2[_0xa9f5('0x1b')](0x8,0xc)+'-'+_0x230fc2[_0xa9f5('0x1b')](0xc,0x10)+'-'+_0x230fc2[_0xa9f5('0x1b')](0x10,0x14)+'-'+_0x230fc2['substring'](0x14);}};
\ No newline at end of file
+var _0x4eca=['keys','filter','family','IPv4','concat','head','mac','00:00:00:00:00:00','address','127.0.0.1','orderBy','map','model','join','createHash','update','getUuid','test','licenseToken','win32','dmidecode\x20--string\x20system-uuid','utf8','replace','md5','digest','hex','substring','lodash','crypto','bimedia-machine-uuid','child_process','execSync','../environment','networkInterfaces'];(function(_0x84bd8c,_0x498d95){var _0x9a8624=function(_0x162357){while(--_0x162357){_0x84bd8c['push'](_0x84bd8c['shift']());}};_0x9a8624(++_0x498d95);}(_0x4eca,0x109));var _0xa4ec=function(_0x17dfcc,_0x4cd857){_0x17dfcc=_0x17dfcc-0x0;var _0x55254c=_0x4eca[_0x17dfcc];return _0x55254c;};'use strict';var _=require(_0xa4ec('0x0'));var os=require('os');var crypto=require(_0xa4ec('0x1'));var machine=require(_0xa4ec('0x2'));var exec=require(_0xa4ec('0x3'))[_0xa4ec('0x4')];var config=require(_0xa4ec('0x5'));function getInterfaces(){var _0x447dee=[];var _0x37ceea=os[_0xa4ec('0x6')]();var _0x3ad854=_['orderBy'](_[_0xa4ec('0x7')](_0x37ceea));for(var _0x3c3994=0x0;_0x3c3994<_0x3ad854['length'];_0x3c3994++){var _0xdd0900=_0x37ceea[_0x3ad854[_0x3c3994]][_0xa4ec('0x8')](function(_0x7c5ecf){return _0x7c5ecf[_0xa4ec('0x9')]===_0xa4ec('0xa')&&_0x7c5ecf['internal']===![];});_0x447dee=_0x447dee[_0xa4ec('0xb')](_0xdd0900);}return _0x447dee;}function getFirstInterface(){var _0x1657dc=_[_0xa4ec('0xc')](getInterfaces());return{'macAddress':_0x1657dc&&_0x1657dc[_0xa4ec('0xd')]?_0x1657dc[_0xa4ec('0xd')]:_0xa4ec('0xe'),'ipAddress':_0x1657dc&&_0x1657dc[_0xa4ec('0xf')]?_0x1657dc[_0xa4ec('0xf')]:_0xa4ec('0x10')};}exports['getFirstInterface']=getFirstInterface;function getCPUhash(){var _0xb575f6=_[_0xa4ec('0x11')](os['cpus']()[_0xa4ec('0x12')](function(_0x2eb5af){return _0x2eb5af[_0xa4ec('0x13')];}))[_0xa4ec('0x14')](':');return crypto[_0xa4ec('0x15')]('md5')[_0xa4ec('0x16')](_0xb575f6)['digest']('hex');}exports[_0xa4ec('0x17')]=function(){var _0xae62ca=os['platform']();var _0x538137=/[0-9a-f-]{36}/;if(config['licenseToken']&&_0x538137[_0xa4ec('0x18')](config[_0xa4ec('0x19')])){return config['licenseToken'];}else if(_0xae62ca===_0xa4ec('0x1a')){return exec(_0xa4ec('0x1b'),{'encoding':_0xa4ec('0x1c')})[_0xa4ec('0x1d')]('\x0d\x0a','');}else{var _0x318ebf=getFirstInterface();var _0x26e826=getCPUhash();var _0x1f294b=_0x26e826+'|'+os['hostname']()+'|'+_0x318ebf['macAddress']+'|'+_0x318ebf['ipAddress'];var _0x5c89b2=crypto['createHash'](_0xa4ec('0x1e'))[_0xa4ec('0x16')](_0x1f294b)[_0xa4ec('0x1f')](_0xa4ec('0x20'));return _0x5c89b2[_0xa4ec('0x21')](0x0,0x8)+'-'+_0x5c89b2[_0xa4ec('0x21')](0x8,0xc)+'-'+_0x5c89b2[_0xa4ec('0x21')](0xc,0x10)+'-'+_0x5c89b2[_0xa4ec('0x21')](0x10,0x14)+'-'+_0x5c89b2['substring'](0x14);}};
\ No newline at end of file