Built motion from commit (unavailable).|2.5.24
[motion2.git] / server / config / license / hardware.js
index d322a38..7627da5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6d19=['lodash','crypto','bimedia-machine-uuid','child_process','execSync','orderBy','keys','filter','IPv4','internal','concat','head','mac','address','getFirstInterface','cpus','map','model','join','md5','update','digest','hex','getUuid','dmidecode\x20--string\x20system-uuid','utf8','replace','hostname','macAddress','ipAddress','createHash','substring'];(function(_0x225074,_0x1abb16){var _0x3fb50c=function(_0xf22c61){while(--_0xf22c61){_0x225074['push'](_0x225074['shift']());}};_0x3fb50c(++_0x1abb16);}(_0x6d19,0x160));var _0x96d1=function(_0x44946b,_0xf874ec){_0x44946b=_0x44946b-0x0;var _0x249bc4=_0x6d19[_0x44946b];return _0x249bc4;};'use strict';var _=require(_0x96d1('0x0'));var os=require('os');var crypto=require(_0x96d1('0x1'));var machine=require(_0x96d1('0x2'));var exec=require(_0x96d1('0x3'))[_0x96d1('0x4')];function getInterfaces(){var _0x31518c=[];var _0x36405d=os['networkInterfaces']();var _0x186315=_[_0x96d1('0x5')](_[_0x96d1('0x6')](_0x36405d));for(var _0x4704b3=0x0;_0x4704b3<_0x186315['length'];_0x4704b3++){var _0x32b7d9=_0x36405d[_0x186315[_0x4704b3]][_0x96d1('0x7')](function(_0x61e0f5){return _0x61e0f5['family']===_0x96d1('0x8')&&_0x61e0f5[_0x96d1('0x9')]===![];});_0x31518c=_0x31518c[_0x96d1('0xa')](_0x32b7d9);}return _0x31518c;}function getFirstInterface(){var _0x4e1e7a=_[_0x96d1('0xb')](getInterfaces());return{'macAddress':_0x4e1e7a&&_0x4e1e7a[_0x96d1('0xc')]?_0x4e1e7a['mac']:'00:00:00:00:00:00','ipAddress':_0x4e1e7a&&_0x4e1e7a[_0x96d1('0xd')]?_0x4e1e7a[_0x96d1('0xd')]:'127.0.0.1'};}exports[_0x96d1('0xe')]=getFirstInterface;function getCPUhash(){var _0x51b089=_[_0x96d1('0x5')](os[_0x96d1('0xf')]()[_0x96d1('0x10')](function(_0xb019fb){return _0xb019fb[_0x96d1('0x11')];}))[_0x96d1('0x12')](':');return crypto['createHash'](_0x96d1('0x13'))[_0x96d1('0x14')](_0x51b089)[_0x96d1('0x15')](_0x96d1('0x16'));}exports[_0x96d1('0x17')]=function(){switch(os['platform']()){case'win32':return exec(_0x96d1('0x18'),{'encoding':_0x96d1('0x19')})[_0x96d1('0x1a')]('\x0d\x0a','');default:var _0x9eb2c4=getFirstInterface();var _0x2d521d=getCPUhash();var _0x3e9a0=_0x2d521d+'|'+os[_0x96d1('0x1b')]()+'|'+_0x9eb2c4[_0x96d1('0x1c')]+'|'+_0x9eb2c4[_0x96d1('0x1d')];var _0x5853f0=crypto[_0x96d1('0x1e')](_0x96d1('0x13'))[_0x96d1('0x14')](_0x3e9a0)[_0x96d1('0x15')](_0x96d1('0x16'));return _0x5853f0['substring'](0x0,0x8)+'-'+_0x5853f0[_0x96d1('0x1f')](0x8,0xc)+'-'+_0x5853f0[_0x96d1('0x1f')](0xc,0x10)+'-'+_0x5853f0[_0x96d1('0x1f')](0x10,0x14)+'-'+_0x5853f0[_0x96d1('0x1f')](0x14);}};
\ No newline at end of file
+var _0x75f0=['bimedia-machine-uuid','child_process','execSync','../environment','networkInterfaces','orderBy','keys','filter','family','IPv4','concat','head','mac','address','127.0.0.1','getFirstInterface','cpus','map','model','join','createHash','md5','update','digest','hex','getUuid','licenseToken','win32','utf8','replace','ipAddress','substring','lodash','crypto'];(function(_0x4ae5d3,_0x3f65fe){var _0x38bb02=function(_0x2b12f8){while(--_0x2b12f8){_0x4ae5d3['push'](_0x4ae5d3['shift']());}};_0x38bb02(++_0x3f65fe);}(_0x75f0,0x196));var _0x075f=function(_0x535d9b,_0xe0de08){_0x535d9b=_0x535d9b-0x0;var _0x1678da=_0x75f0[_0x535d9b];return _0x1678da;};'use strict';var _=require(_0x075f('0x0'));var os=require('os');var crypto=require(_0x075f('0x1'));var machine=require(_0x075f('0x2'));var exec=require(_0x075f('0x3'))[_0x075f('0x4')];var config=require(_0x075f('0x5'));function getInterfaces(){var _0x37e1bf=[];var _0x1cd9bb=os[_0x075f('0x6')]();var _0x5270ff=_[_0x075f('0x7')](_[_0x075f('0x8')](_0x1cd9bb));for(var _0x1270b4=0x0;_0x1270b4<_0x5270ff['length'];_0x1270b4++){var _0x486074=_0x1cd9bb[_0x5270ff[_0x1270b4]][_0x075f('0x9')](function(_0x536ad0){return _0x536ad0[_0x075f('0xa')]===_0x075f('0xb')&&_0x536ad0['internal']===![];});_0x37e1bf=_0x37e1bf[_0x075f('0xc')](_0x486074);}return _0x37e1bf;}function getFirstInterface(){var _0x22c214=_[_0x075f('0xd')](getInterfaces());return{'macAddress':_0x22c214&&_0x22c214[_0x075f('0xe')]?_0x22c214[_0x075f('0xe')]:'00:00:00:00:00:00','ipAddress':_0x22c214&&_0x22c214['address']?_0x22c214[_0x075f('0xf')]:_0x075f('0x10')};}exports[_0x075f('0x11')]=getFirstInterface;function getCPUhash(){var _0x44765d=_[_0x075f('0x7')](os[_0x075f('0x12')]()[_0x075f('0x13')](function(_0x174c53){return _0x174c53[_0x075f('0x14')];}))[_0x075f('0x15')](':');return crypto[_0x075f('0x16')](_0x075f('0x17'))[_0x075f('0x18')](_0x44765d)[_0x075f('0x19')](_0x075f('0x1a'));}exports[_0x075f('0x1b')]=function(){var _0x90f647=os['platform']();var _0x3a9807=/[0-9a-f-]{36}/;if(config['licenseToken']&&_0x3a9807['test'](config[_0x075f('0x1c')])){return config[_0x075f('0x1c')];}else if(_0x90f647===_0x075f('0x1d')){return exec('dmidecode\x20--string\x20system-uuid',{'encoding':_0x075f('0x1e')})[_0x075f('0x1f')]('\x0d\x0a','');}else{var _0x55a625=getFirstInterface();var _0x4cc5ab=getCPUhash();var _0x355070=_0x4cc5ab+'|'+os['hostname']()+'|'+_0x55a625['macAddress']+'|'+_0x55a625[_0x075f('0x20')];var _0x25a655=crypto[_0x075f('0x16')](_0x075f('0x17'))[_0x075f('0x18')](_0x355070)[_0x075f('0x19')](_0x075f('0x1a'));return _0x25a655[_0x075f('0x21')](0x0,0x8)+'-'+_0x25a655[_0x075f('0x21')](0x8,0xc)+'-'+_0x25a655[_0x075f('0x21')](0xc,0x10)+'-'+_0x25a655[_0x075f('0x21')](0x10,0x14)+'-'+_0x25a655['substring'](0x14);}};
\ No newline at end of file