Built motion from commit 351e7f9c.|2.6.31
[motion2.git] / server / config / license / hardware.js
index fb403ea..90559c9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9a8e=['bimedia-machine-uuid','child_process','execSync','networkInterfaces','keys','length','filter','family','internal','concat','head','mac','address','127.0.0.1','getFirstInterface','cpus','map','model','join','md5','update','digest','hex','platform','licenseToken','test','dmidecode\x20--string\x20system-uuid','replace','hostname','macAddress','ipAddress','createHash','substring','lodash','crypto'];(function(_0x4ce01c,_0x48f585){var _0x2772df=function(_0x112d24){while(--_0x112d24){_0x4ce01c['push'](_0x4ce01c['shift']());}};_0x2772df(++_0x48f585);}(_0x9a8e,0x15c));var _0xe9a8=function(_0x14819e,_0x442ea4){_0x14819e=_0x14819e-0x0;var _0x33133c=_0x9a8e[_0x14819e];return _0x33133c;};'use strict';var _=require(_0xe9a8('0x0'));var os=require('os');var crypto=require(_0xe9a8('0x1'));var machine=require(_0xe9a8('0x2'));var exec=require(_0xe9a8('0x3'))[_0xe9a8('0x4')];var config=require('../environment');function getInterfaces(){var _0x35336d=[];var _0x2bf070=os[_0xe9a8('0x5')]();var _0x46c289=_['orderBy'](_[_0xe9a8('0x6')](_0x2bf070));for(var _0x1d29cc=0x0;_0x1d29cc<_0x46c289[_0xe9a8('0x7')];_0x1d29cc++){var _0x4db0ce=_0x2bf070[_0x46c289[_0x1d29cc]][_0xe9a8('0x8')](function(_0x341b0e){return _0x341b0e[_0xe9a8('0x9')]==='IPv4'&&_0x341b0e[_0xe9a8('0xa')]===![];});_0x35336d=_0x35336d[_0xe9a8('0xb')](_0x4db0ce);}return _0x35336d;}function getFirstInterface(){var _0x48dcb0=_[_0xe9a8('0xc')](getInterfaces());return{'macAddress':_0x48dcb0&&_0x48dcb0[_0xe9a8('0xd')]?_0x48dcb0[_0xe9a8('0xd')]:'00:00:00:00:00:00','ipAddress':_0x48dcb0&&_0x48dcb0[_0xe9a8('0xe')]?_0x48dcb0['address']:_0xe9a8('0xf')};}exports[_0xe9a8('0x10')]=getFirstInterface;function getCPUhash(){var _0x23bc3a=_['orderBy'](os[_0xe9a8('0x11')]()[_0xe9a8('0x12')](function(_0x1ee1f3){return _0x1ee1f3[_0xe9a8('0x13')];}))[_0xe9a8('0x14')](':');return crypto['createHash'](_0xe9a8('0x15'))[_0xe9a8('0x16')](_0x23bc3a)[_0xe9a8('0x17')](_0xe9a8('0x18'));}exports['getUuid']=function(){var _0x1a35fd=os[_0xe9a8('0x19')]();var _0x20984f=/[0-9a-f-]{36}/;if(config[_0xe9a8('0x1a')]&&_0x20984f[_0xe9a8('0x1b')](config[_0xe9a8('0x1a')])){return config[_0xe9a8('0x1a')];}else if(_0x1a35fd==='win32'){return exec(_0xe9a8('0x1c'),{'encoding':'utf8'})[_0xe9a8('0x1d')]('\x0d\x0a','');}else{var _0x5670e5=getFirstInterface();var _0x208e65=getCPUhash();var _0x50e53c=_0x208e65+'|'+os[_0xe9a8('0x1e')]()+'|'+_0x5670e5[_0xe9a8('0x1f')]+'|'+_0x5670e5[_0xe9a8('0x20')];var _0xbec2=crypto[_0xe9a8('0x21')](_0xe9a8('0x15'))[_0xe9a8('0x16')](_0x50e53c)['digest'](_0xe9a8('0x18'));return _0xbec2['substring'](0x0,0x8)+'-'+_0xbec2[_0xe9a8('0x22')](0x8,0xc)+'-'+_0xbec2[_0xe9a8('0x22')](0xc,0x10)+'-'+_0xbec2[_0xe9a8('0x22')](0x10,0x14)+'-'+_0xbec2['substring'](0x14);}};
\ No newline at end of file
+var _0x4b6e=['model','createHash','md5','hex','getUuid','platform','licenseToken','test','win32','dmidecode\x20--string\x20system-uuid','utf8','replace','hostname','macAddress','ipAddress','update','substring','lodash','crypto','bimedia-machine-uuid','child_process','execSync','../environment','networkInterfaces','orderBy','keys','length','filter','family','IPv4','internal','concat','mac','00:00:00:00:00:00','address','127.0.0.1','getFirstInterface','cpus','map'];(function(_0x396910,_0x397bda){var _0x217d81=function(_0x1e6ab9){while(--_0x1e6ab9){_0x396910['push'](_0x396910['shift']());}};_0x217d81(++_0x397bda);}(_0x4b6e,0x1e5));var _0xe4b6=function(_0x4a4895,_0x2d44a9){_0x4a4895=_0x4a4895-0x0;var _0x421e92=_0x4b6e[_0x4a4895];return _0x421e92;};'use strict';var _=require(_0xe4b6('0x0'));var os=require('os');var crypto=require(_0xe4b6('0x1'));var machine=require(_0xe4b6('0x2'));var exec=require(_0xe4b6('0x3'))[_0xe4b6('0x4')];var config=require(_0xe4b6('0x5'));function getInterfaces(){var _0x40dbf4=[];var _0x1cfbc5=os[_0xe4b6('0x6')]();var _0x3bdf8b=_[_0xe4b6('0x7')](_[_0xe4b6('0x8')](_0x1cfbc5));for(var _0x516403=0x0;_0x516403<_0x3bdf8b[_0xe4b6('0x9')];_0x516403++){var _0x12e7af=_0x1cfbc5[_0x3bdf8b[_0x516403]][_0xe4b6('0xa')](function(_0x2ceef2){return _0x2ceef2[_0xe4b6('0xb')]===_0xe4b6('0xc')&&_0x2ceef2[_0xe4b6('0xd')]===![];});_0x40dbf4=_0x40dbf4[_0xe4b6('0xe')](_0x12e7af);}return _0x40dbf4;}function getFirstInterface(){var _0x351f72=_['head'](getInterfaces());return{'macAddress':_0x351f72&&_0x351f72[_0xe4b6('0xf')]?_0x351f72[_0xe4b6('0xf')]:_0xe4b6('0x10'),'ipAddress':_0x351f72&&_0x351f72[_0xe4b6('0x11')]?_0x351f72[_0xe4b6('0x11')]:_0xe4b6('0x12')};}exports[_0xe4b6('0x13')]=getFirstInterface;function getCPUhash(){var _0x504f71=_[_0xe4b6('0x7')](os[_0xe4b6('0x14')]()[_0xe4b6('0x15')](function(_0x284b84){return _0x284b84[_0xe4b6('0x16')];}))['join'](':');return crypto[_0xe4b6('0x17')](_0xe4b6('0x18'))['update'](_0x504f71)['digest'](_0xe4b6('0x19'));}exports[_0xe4b6('0x1a')]=function(){var _0x5d71fa=os[_0xe4b6('0x1b')]();var _0x5ce7f4=/[0-9a-f-]{36}/;if(config[_0xe4b6('0x1c')]&&_0x5ce7f4[_0xe4b6('0x1d')](config['licenseToken'])){return config[_0xe4b6('0x1c')];}else if(_0x5d71fa===_0xe4b6('0x1e')){return exec(_0xe4b6('0x1f'),{'encoding':_0xe4b6('0x20')})[_0xe4b6('0x21')]('\x0d\x0a','');}else{var _0x499090=getFirstInterface();var _0x4182ab=getCPUhash();var _0x2f5c0e=_0x4182ab+'|'+os[_0xe4b6('0x22')]()+'|'+_0x499090[_0xe4b6('0x23')]+'|'+_0x499090[_0xe4b6('0x24')];var _0xf5173c=crypto['createHash'](_0xe4b6('0x18'))[_0xe4b6('0x25')](_0x2f5c0e)['digest']('hex');return _0xf5173c['substring'](0x0,0x8)+'-'+_0xf5173c['substring'](0x8,0xc)+'-'+_0xf5173c[_0xe4b6('0x26')](0xc,0x10)+'-'+_0xf5173c[_0xe4b6('0x26')](0x10,0x14)+'-'+_0xf5173c[_0xe4b6('0x26')](0x14);}};
\ No newline at end of file