Built motion from commit ddca4d0d.|2.5.47
[motion2.git] / server / config / license / hardware.js
index 3c61b8a..276684a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd130=['../environment','networkInterfaces','orderBy','keys','length','mac','00:00:00:00:00:00','127.0.0.1','cpus','join','md5','update','digest','hex','getUuid','platform','test','licenseToken','win32','dmidecode\x20--string\x20system-uuid','replace','macAddress','ipAddress','createHash','substring','lodash','crypto','bimedia-machine-uuid','execSync'];(function(_0x1d1779,_0x284147){var _0x2377e9=function(_0x299f6f){while(--_0x299f6f){_0x1d1779['push'](_0x1d1779['shift']());}};_0x2377e9(++_0x284147);}(_0xd130,0x101));var _0x0d13=function(_0x5da528,_0x27f9eb){_0x5da528=_0x5da528-0x0;var _0x51563e=_0xd130[_0x5da528];return _0x51563e;};'use strict';var _=require(_0x0d13('0x0'));var os=require('os');var crypto=require(_0x0d13('0x1'));var machine=require(_0x0d13('0x2'));var exec=require('child_process')[_0x0d13('0x3')];var config=require(_0x0d13('0x4'));function getInterfaces(){var _0x1f7a74=[];var _0x1fe67d=os[_0x0d13('0x5')]();var _0x229069=_[_0x0d13('0x6')](_[_0x0d13('0x7')](_0x1fe67d));for(var _0x51bd64=0x0;_0x51bd64<_0x229069[_0x0d13('0x8')];_0x51bd64++){var _0x113bca=_0x1fe67d[_0x229069[_0x51bd64]]['filter'](function(_0x313d7f){return _0x313d7f['family']==='IPv4'&&_0x313d7f['internal']===![];});_0x1f7a74=_0x1f7a74['concat'](_0x113bca);}return _0x1f7a74;}function getFirstInterface(){var _0x13544d=_['head'](getInterfaces());return{'macAddress':_0x13544d&&_0x13544d[_0x0d13('0x9')]?_0x13544d[_0x0d13('0x9')]:_0x0d13('0xa'),'ipAddress':_0x13544d&&_0x13544d['address']?_0x13544d['address']:_0x0d13('0xb')};}exports['getFirstInterface']=getFirstInterface;function getCPUhash(){var _0x35a3e=_[_0x0d13('0x6')](os[_0x0d13('0xc')]()['map'](function(_0x54b65e){return _0x54b65e['model'];}))[_0x0d13('0xd')](':');return crypto['createHash'](_0x0d13('0xe'))[_0x0d13('0xf')](_0x35a3e)[_0x0d13('0x10')](_0x0d13('0x11'));}exports[_0x0d13('0x12')]=function(){var _0x28260a=os[_0x0d13('0x13')]();var _0x268db7=/[0-9a-f-]{36}/;if(config['licenseToken']&&_0x268db7[_0x0d13('0x14')](config[_0x0d13('0x15')])){return config[_0x0d13('0x15')];}else if(_0x28260a===_0x0d13('0x16')){return exec(_0x0d13('0x17'),{'encoding':'utf8'})[_0x0d13('0x18')]('\x0d\x0a','');}else{var _0x470dad=getFirstInterface();var _0x5b7c1c=getCPUhash();var _0x4760a6=_0x5b7c1c+'|'+os['hostname']()+'|'+_0x470dad[_0x0d13('0x19')]+'|'+_0x470dad[_0x0d13('0x1a')];var _0x1c3a63=crypto[_0x0d13('0x1b')](_0x0d13('0xe'))[_0x0d13('0xf')](_0x4760a6)[_0x0d13('0x10')](_0x0d13('0x11'));return _0x1c3a63[_0x0d13('0x1c')](0x0,0x8)+'-'+_0x1c3a63['substring'](0x8,0xc)+'-'+_0x1c3a63[_0x0d13('0x1c')](0xc,0x10)+'-'+_0x1c3a63[_0x0d13('0x1c')](0x10,0x14)+'-'+_0x1c3a63[_0x0d13('0x1c')](0x14);}};
\ No newline at end of file
+var _0x8f80=['../environment','networkInterfaces','orderBy','keys','filter','IPv4','head','mac','00:00:00:00:00:00','address','127.0.0.1','getFirstInterface','cpus','model','join','createHash','md5','digest','hex','getUuid','test','licenseToken','dmidecode\x20--string\x20system-uuid','utf8','hostname','macAddress','update','substring','lodash','bimedia-machine-uuid','child_process'];(function(_0xa9cd31,_0xff422b){var _0x30e2c5=function(_0x40fea1){while(--_0x40fea1){_0xa9cd31['push'](_0xa9cd31['shift']());}};_0x30e2c5(++_0xff422b);}(_0x8f80,0x1ed));var _0x08f8=function(_0x30ed55,_0x55a112){_0x30ed55=_0x30ed55-0x0;var _0x149e64=_0x8f80[_0x30ed55];return _0x149e64;};'use strict';var _=require(_0x08f8('0x0'));var os=require('os');var crypto=require('crypto');var machine=require(_0x08f8('0x1'));var exec=require(_0x08f8('0x2'))['execSync'];var config=require(_0x08f8('0x3'));function getInterfaces(){var _0x835aea=[];var _0x41d410=os[_0x08f8('0x4')]();var _0x357d0a=_[_0x08f8('0x5')](_[_0x08f8('0x6')](_0x41d410));for(var _0x4cdada=0x0;_0x4cdada<_0x357d0a['length'];_0x4cdada++){var _0x496dc1=_0x41d410[_0x357d0a[_0x4cdada]][_0x08f8('0x7')](function(_0x26d08c){return _0x26d08c['family']===_0x08f8('0x8')&&_0x26d08c['internal']===![];});_0x835aea=_0x835aea['concat'](_0x496dc1);}return _0x835aea;}function getFirstInterface(){var _0x30f0fd=_[_0x08f8('0x9')](getInterfaces());return{'macAddress':_0x30f0fd&&_0x30f0fd[_0x08f8('0xa')]?_0x30f0fd[_0x08f8('0xa')]:_0x08f8('0xb'),'ipAddress':_0x30f0fd&&_0x30f0fd[_0x08f8('0xc')]?_0x30f0fd['address']:_0x08f8('0xd')};}exports[_0x08f8('0xe')]=getFirstInterface;function getCPUhash(){var _0x1fa180=_[_0x08f8('0x5')](os[_0x08f8('0xf')]()['map'](function(_0x371609){return _0x371609[_0x08f8('0x10')];}))[_0x08f8('0x11')](':');return crypto[_0x08f8('0x12')](_0x08f8('0x13'))['update'](_0x1fa180)[_0x08f8('0x14')](_0x08f8('0x15'));}exports[_0x08f8('0x16')]=function(){var _0x381693=os['platform']();var _0x2aee96=/[0-9a-f-]{36}/;if(config['licenseToken']&&_0x2aee96[_0x08f8('0x17')](config[_0x08f8('0x18')])){return config[_0x08f8('0x18')];}else if(_0x381693==='win32'){return exec(_0x08f8('0x19'),{'encoding':_0x08f8('0x1a')})['replace']('\x0d\x0a','');}else{var _0x2bad38=getFirstInterface();var _0x45ac07=getCPUhash();var _0x2bf9ac=_0x45ac07+'|'+os[_0x08f8('0x1b')]()+'|'+_0x2bad38[_0x08f8('0x1c')]+'|'+_0x2bad38['ipAddress'];var _0x28b181=crypto[_0x08f8('0x12')]('md5')[_0x08f8('0x1d')](_0x2bf9ac)[_0x08f8('0x14')]('hex');return _0x28b181[_0x08f8('0x1e')](0x0,0x8)+'-'+_0x28b181[_0x08f8('0x1e')](0x8,0xc)+'-'+_0x28b181[_0x08f8('0x1e')](0xc,0x10)+'-'+_0x28b181[_0x08f8('0x1e')](0x10,0x14)+'-'+_0x28b181['substring'](0x14);}};
\ No newline at end of file