Built motion from commit efa66e19.|2.6.22
[motion2.git] / server / config / license / hardware.js
index 8ccf706..cfae2f7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbf7b=['family','IPv4','internal','mac','address','cpus','map','model','createHash','update','getUuid','test','licenseToken','win32','dmidecode\x20--string\x20system-uuid','utf8','replace','macAddress','md5','substring','lodash','bimedia-machine-uuid','child_process','execSync','../environment','networkInterfaces','orderBy','length','filter'];(function(_0x32894c,_0x44704e){var _0x4b38e7=function(_0x367e89){while(--_0x367e89){_0x32894c['push'](_0x32894c['shift']());}};_0x4b38e7(++_0x44704e);}(_0xbf7b,0x1e4));var _0xbbf7=function(_0x77305c,_0x30e10a){_0x77305c=_0x77305c-0x0;var _0x167388=_0xbf7b[_0x77305c];return _0x167388;};'use strict';var _=require(_0xbbf7('0x0'));var os=require('os');var crypto=require('crypto');var machine=require(_0xbbf7('0x1'));var exec=require(_0xbbf7('0x2'))[_0xbbf7('0x3')];var config=require(_0xbbf7('0x4'));function getInterfaces(){var _0x7957ce=[];var _0x5d82b4=os[_0xbbf7('0x5')]();var _0x11280c=_[_0xbbf7('0x6')](_['keys'](_0x5d82b4));for(var _0x10ff84=0x0;_0x10ff84<_0x11280c[_0xbbf7('0x7')];_0x10ff84++){var _0x46b9e0=_0x5d82b4[_0x11280c[_0x10ff84]][_0xbbf7('0x8')](function(_0x3c8709){return _0x3c8709[_0xbbf7('0x9')]===_0xbbf7('0xa')&&_0x3c8709[_0xbbf7('0xb')]===![];});_0x7957ce=_0x7957ce['concat'](_0x46b9e0);}return _0x7957ce;}function getFirstInterface(){var _0x42fd25=_['head'](getInterfaces());return{'macAddress':_0x42fd25&&_0x42fd25[_0xbbf7('0xc')]?_0x42fd25[_0xbbf7('0xc')]:'00:00:00:00:00:00','ipAddress':_0x42fd25&&_0x42fd25[_0xbbf7('0xd')]?_0x42fd25['address']:'127.0.0.1'};}exports['getFirstInterface']=getFirstInterface;function getCPUhash(){var _0x2de481=_[_0xbbf7('0x6')](os[_0xbbf7('0xe')]()[_0xbbf7('0xf')](function(_0x3ac760){return _0x3ac760[_0xbbf7('0x10')];}))['join'](':');return crypto[_0xbbf7('0x11')]('md5')[_0xbbf7('0x12')](_0x2de481)['digest']('hex');}exports[_0xbbf7('0x13')]=function(){var _0x421e15=os['platform']();var _0x360de1=/[0-9a-f-]{36}/;if(config['licenseToken']&&_0x360de1[_0xbbf7('0x14')](config[_0xbbf7('0x15')])){return config[_0xbbf7('0x15')];}else if(_0x421e15===_0xbbf7('0x16')){return exec(_0xbbf7('0x17'),{'encoding':_0xbbf7('0x18')})[_0xbbf7('0x19')]('\x0d\x0a','');}else{var _0x1964f8=getFirstInterface();var _0x5e6750=getCPUhash();var _0x4e75e5=_0x5e6750+'|'+os['hostname']()+'|'+_0x1964f8[_0xbbf7('0x1a')]+'|'+_0x1964f8['ipAddress'];var _0x3f31d8=crypto['createHash'](_0xbbf7('0x1b'))[_0xbbf7('0x12')](_0x4e75e5)['digest']('hex');return _0x3f31d8[_0xbbf7('0x1c')](0x0,0x8)+'-'+_0x3f31d8[_0xbbf7('0x1c')](0x8,0xc)+'-'+_0x3f31d8[_0xbbf7('0x1c')](0xc,0x10)+'-'+_0x3f31d8[_0xbbf7('0x1c')](0x10,0x14)+'-'+_0x3f31d8[_0xbbf7('0x1c')](0x14);}};
\ No newline at end of file
+var _0x5a94=['platform','licenseToken','test','win32','utf8','hostname','macAddress','ipAddress','update','substring','crypto','bimedia-machine-uuid','../environment','networkInterfaces','orderBy','keys','length','filter','family','IPv4','internal','concat','mac','00:00:00:00:00:00','address','cpus','model','join','createHash','md5','digest','hex','getUuid'];(function(_0x1203f,_0x554bbc){var _0x365f0a=function(_0x3531d0){while(--_0x3531d0){_0x1203f['push'](_0x1203f['shift']());}};_0x365f0a(++_0x554bbc);}(_0x5a94,0x6d));var _0x45a9=function(_0x167cc1,_0x56ef5a){_0x167cc1=_0x167cc1-0x0;var _0x10bc4b=_0x5a94[_0x167cc1];return _0x10bc4b;};'use strict';var _=require('lodash');var os=require('os');var crypto=require(_0x45a9('0x0'));var machine=require(_0x45a9('0x1'));var exec=require('child_process')['execSync'];var config=require(_0x45a9('0x2'));function getInterfaces(){var _0x3bda3d=[];var _0x598b81=os[_0x45a9('0x3')]();var _0x1e0133=_[_0x45a9('0x4')](_[_0x45a9('0x5')](_0x598b81));for(var _0x428235=0x0;_0x428235<_0x1e0133[_0x45a9('0x6')];_0x428235++){var _0x648fc5=_0x598b81[_0x1e0133[_0x428235]][_0x45a9('0x7')](function(_0x15ed89){return _0x15ed89[_0x45a9('0x8')]===_0x45a9('0x9')&&_0x15ed89[_0x45a9('0xa')]===![];});_0x3bda3d=_0x3bda3d[_0x45a9('0xb')](_0x648fc5);}return _0x3bda3d;}function getFirstInterface(){var _0x442446=_['head'](getInterfaces());return{'macAddress':_0x442446&&_0x442446[_0x45a9('0xc')]?_0x442446[_0x45a9('0xc')]:_0x45a9('0xd'),'ipAddress':_0x442446&&_0x442446[_0x45a9('0xe')]?_0x442446[_0x45a9('0xe')]:'127.0.0.1'};}exports['getFirstInterface']=getFirstInterface;function getCPUhash(){var _0x24d49a=_[_0x45a9('0x4')](os[_0x45a9('0xf')]()['map'](function(_0x534cd7){return _0x534cd7[_0x45a9('0x10')];}))[_0x45a9('0x11')](':');return crypto[_0x45a9('0x12')](_0x45a9('0x13'))['update'](_0x24d49a)[_0x45a9('0x14')](_0x45a9('0x15'));}exports[_0x45a9('0x16')]=function(){var _0x239666=os[_0x45a9('0x17')]();var _0x483c0b=/[0-9a-f-]{36}/;if(config[_0x45a9('0x18')]&&_0x483c0b[_0x45a9('0x19')](config['licenseToken'])){return config['licenseToken'];}else if(_0x239666===_0x45a9('0x1a')){return exec('dmidecode\x20--string\x20system-uuid',{'encoding':_0x45a9('0x1b')})['replace']('\x0d\x0a','');}else{var _0x57a1aa=getFirstInterface();var _0x242e40=getCPUhash();var _0x47cc4a=_0x242e40+'|'+os[_0x45a9('0x1c')]()+'|'+_0x57a1aa[_0x45a9('0x1d')]+'|'+_0x57a1aa[_0x45a9('0x1e')];var _0x88a533=crypto['createHash']('md5')[_0x45a9('0x1f')](_0x47cc4a)[_0x45a9('0x14')](_0x45a9('0x15'));return _0x88a533[_0x45a9('0x20')](0x0,0x8)+'-'+_0x88a533[_0x45a9('0x20')](0x8,0xc)+'-'+_0x88a533[_0x45a9('0x20')](0xc,0x10)+'-'+_0x88a533['substring'](0x10,0x14)+'-'+_0x88a533['substring'](0x14);}};
\ No newline at end of file