Built motion from commit 3770a7bd.|2.6.29
[motion2.git] / server / config / license / hardware.js
index e995ef3..e3fb074 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc3ea=['licenseToken','win32','dmidecode\x20--string\x20system-uuid','utf8','replace','macAddress','ipAddress','update','substring','lodash','crypto','bimedia-machine-uuid','execSync','../environment','networkInterfaces','orderBy','keys','length','filter','family','internal','concat','head','mac','00:00:00:00:00:00','address','127.0.0.1','map','join','createHash','md5','digest','hex','getUuid'];(function(_0x38e238,_0x30c62a){var _0x555014=function(_0x5ac8ea){while(--_0x5ac8ea){_0x38e238['push'](_0x38e238['shift']());}};_0x555014(++_0x30c62a);}(_0xc3ea,0x1c3));var _0xac3e=function(_0x513f27,_0x1cbc87){_0x513f27=_0x513f27-0x0;var _0xa316b7=_0xc3ea[_0x513f27];return _0xa316b7;};'use strict';var _=require(_0xac3e('0x0'));var os=require('os');var crypto=require(_0xac3e('0x1'));var machine=require(_0xac3e('0x2'));var exec=require('child_process')[_0xac3e('0x3')];var config=require(_0xac3e('0x4'));function getInterfaces(){var _0x174c72=[];var _0x2a536e=os[_0xac3e('0x5')]();var _0x126f18=_[_0xac3e('0x6')](_[_0xac3e('0x7')](_0x2a536e));for(var _0x27682e=0x0;_0x27682e<_0x126f18[_0xac3e('0x8')];_0x27682e++){var _0x2cd621=_0x2a536e[_0x126f18[_0x27682e]][_0xac3e('0x9')](function(_0xff33bb){return _0xff33bb[_0xac3e('0xa')]==='IPv4'&&_0xff33bb[_0xac3e('0xb')]===![];});_0x174c72=_0x174c72[_0xac3e('0xc')](_0x2cd621);}return _0x174c72;}function getFirstInterface(){var _0x1cc4df=_[_0xac3e('0xd')](getInterfaces());return{'macAddress':_0x1cc4df&&_0x1cc4df[_0xac3e('0xe')]?_0x1cc4df[_0xac3e('0xe')]:_0xac3e('0xf'),'ipAddress':_0x1cc4df&&_0x1cc4df[_0xac3e('0x10')]?_0x1cc4df[_0xac3e('0x10')]:_0xac3e('0x11')};}exports['getFirstInterface']=getFirstInterface;function getCPUhash(){var _0x29cc59=_[_0xac3e('0x6')](os['cpus']()[_0xac3e('0x12')](function(_0x4073bc){return _0x4073bc['model'];}))[_0xac3e('0x13')](':');return crypto[_0xac3e('0x14')](_0xac3e('0x15'))['update'](_0x29cc59)[_0xac3e('0x16')](_0xac3e('0x17'));}exports[_0xac3e('0x18')]=function(){var _0x2aee89=os['platform']();var _0xe1f655=/[0-9a-f-]{36}/;if(config[_0xac3e('0x19')]&&_0xe1f655['test'](config[_0xac3e('0x19')])){return config[_0xac3e('0x19')];}else if(_0x2aee89===_0xac3e('0x1a')){return exec(_0xac3e('0x1b'),{'encoding':_0xac3e('0x1c')})[_0xac3e('0x1d')]('\x0d\x0a','');}else{var _0x5a6d04=getFirstInterface();var _0x3ab8f1=getCPUhash();var _0x236ba0=_0x3ab8f1+'|'+os['hostname']()+'|'+_0x5a6d04[_0xac3e('0x1e')]+'|'+_0x5a6d04[_0xac3e('0x1f')];var _0x6e277f=crypto[_0xac3e('0x14')](_0xac3e('0x15'))[_0xac3e('0x20')](_0x236ba0)['digest'](_0xac3e('0x17'));return _0x6e277f[_0xac3e('0x21')](0x0,0x8)+'-'+_0x6e277f[_0xac3e('0x21')](0x8,0xc)+'-'+_0x6e277f[_0xac3e('0x21')](0xc,0x10)+'-'+_0x6e277f[_0xac3e('0x21')](0x10,0x14)+'-'+_0x6e277f[_0xac3e('0x21')](0x14);}};
\ No newline at end of file
+var _0xfc14=['win32','dmidecode\x20--string\x20system-uuid','utf8','replace','hostname','macAddress','ipAddress','md5','update','substring','lodash','crypto','bimedia-machine-uuid','child_process','execSync','../environment','keys','length','IPv4','concat','head','mac','00:00:00:00:00:00','address','127.0.0.1','getFirstInterface','orderBy','cpus','model','join','createHash','hex','getUuid','licenseToken','test'];(function(_0x293d91,_0x2a8714){var _0x5ec6c1=function(_0x57d16a){while(--_0x57d16a){_0x293d91['push'](_0x293d91['shift']());}};_0x5ec6c1(++_0x2a8714);}(_0xfc14,0x1f4));var _0x4fc1=function(_0x458969,_0x12b9ee){_0x458969=_0x458969-0x0;var _0x48e183=_0xfc14[_0x458969];return _0x48e183;};'use strict';var _=require(_0x4fc1('0x0'));var os=require('os');var crypto=require(_0x4fc1('0x1'));var machine=require(_0x4fc1('0x2'));var exec=require(_0x4fc1('0x3'))[_0x4fc1('0x4')];var config=require(_0x4fc1('0x5'));function getInterfaces(){var _0x35cf3c=[];var _0x4605f7=os['networkInterfaces']();var _0x35494f=_['orderBy'](_[_0x4fc1('0x6')](_0x4605f7));for(var _0x2a5a2a=0x0;_0x2a5a2a<_0x35494f[_0x4fc1('0x7')];_0x2a5a2a++){var _0x49cd67=_0x4605f7[_0x35494f[_0x2a5a2a]]['filter'](function(_0x1e2e71){return _0x1e2e71['family']===_0x4fc1('0x8')&&_0x1e2e71['internal']===![];});_0x35cf3c=_0x35cf3c[_0x4fc1('0x9')](_0x49cd67);}return _0x35cf3c;}function getFirstInterface(){var _0x44617f=_[_0x4fc1('0xa')](getInterfaces());return{'macAddress':_0x44617f&&_0x44617f[_0x4fc1('0xb')]?_0x44617f[_0x4fc1('0xb')]:_0x4fc1('0xc'),'ipAddress':_0x44617f&&_0x44617f[_0x4fc1('0xd')]?_0x44617f[_0x4fc1('0xd')]:_0x4fc1('0xe')};}exports[_0x4fc1('0xf')]=getFirstInterface;function getCPUhash(){var _0x24b138=_[_0x4fc1('0x10')](os[_0x4fc1('0x11')]()['map'](function(_0x24dc09){return _0x24dc09[_0x4fc1('0x12')];}))[_0x4fc1('0x13')](':');return crypto[_0x4fc1('0x14')]('md5')['update'](_0x24b138)['digest'](_0x4fc1('0x15'));}exports[_0x4fc1('0x16')]=function(){var _0x391e5e=os['platform']();var _0x382ef7=/[0-9a-f-]{36}/;if(config[_0x4fc1('0x17')]&&_0x382ef7[_0x4fc1('0x18')](config[_0x4fc1('0x17')])){return config[_0x4fc1('0x17')];}else if(_0x391e5e===_0x4fc1('0x19')){return exec(_0x4fc1('0x1a'),{'encoding':_0x4fc1('0x1b')})[_0x4fc1('0x1c')]('\x0d\x0a','');}else{var _0x4a2603=getFirstInterface();var _0x3f5807=getCPUhash();var _0x387199=_0x3f5807+'|'+os[_0x4fc1('0x1d')]()+'|'+_0x4a2603[_0x4fc1('0x1e')]+'|'+_0x4a2603[_0x4fc1('0x1f')];var _0x4ec034=crypto[_0x4fc1('0x14')](_0x4fc1('0x20'))[_0x4fc1('0x21')](_0x387199)['digest'](_0x4fc1('0x15'));return _0x4ec034[_0x4fc1('0x22')](0x0,0x8)+'-'+_0x4ec034[_0x4fc1('0x22')](0x8,0xc)+'-'+_0x4ec034[_0x4fc1('0x22')](0xc,0x10)+'-'+_0x4ec034['substring'](0x10,0x14)+'-'+_0x4ec034[_0x4fc1('0x22')](0x14);}};
\ No newline at end of file