Built motion from commit 25580385.|2.6.2
[motion2.git] / server / config / license / hardware.js
index 7263e85..2a75585 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2975=['update','hex','substring','crypto','bimedia-machine-uuid','child_process','execSync','keys','length','filter','family','internal','concat','head','mac','00:00:00:00:00:00','address','getFirstInterface','orderBy','map','createHash','md5','digest','getUuid','platform','dmidecode\x20--string\x20system-uuid','utf8','replace','hostname','macAddress'];(function(_0x2faddb,_0xc18b78){var _0x273c05=function(_0x1a3785){while(--_0x1a3785){_0x2faddb['push'](_0x2faddb['shift']());}};_0x273c05(++_0xc18b78);}(_0x2975,0x1c5));var _0x5297=function(_0xbddbe0,_0x469f9d){_0xbddbe0=_0xbddbe0-0x0;var _0x1bb634=_0x2975[_0xbddbe0];return _0x1bb634;};'use strict';var _=require('lodash');var os=require('os');var crypto=require(_0x5297('0x0'));var machine=require(_0x5297('0x1'));var exec=require(_0x5297('0x2'))[_0x5297('0x3')];function getInterfaces(){var _0x115e60=[];var _0x178801=os['networkInterfaces']();var _0x56371f=_['orderBy'](_[_0x5297('0x4')](_0x178801));for(var _0x15d62b=0x0;_0x15d62b<_0x56371f[_0x5297('0x5')];_0x15d62b++){var _0x3da9c6=_0x178801[_0x56371f[_0x15d62b]][_0x5297('0x6')](function(_0x1f6762){return _0x1f6762[_0x5297('0x7')]==='IPv4'&&_0x1f6762[_0x5297('0x8')]===![];});_0x115e60=_0x115e60[_0x5297('0x9')](_0x3da9c6);}return _0x115e60;}function getFirstInterface(){var _0x3f7368=_[_0x5297('0xa')](getInterfaces());return{'macAddress':_0x3f7368&&_0x3f7368[_0x5297('0xb')]?_0x3f7368['mac']:_0x5297('0xc'),'ipAddress':_0x3f7368&&_0x3f7368[_0x5297('0xd')]?_0x3f7368[_0x5297('0xd')]:'127.0.0.1'};}exports[_0x5297('0xe')]=getFirstInterface;function getCPUhash(){var _0x30d068=_[_0x5297('0xf')](os['cpus']()[_0x5297('0x10')](function(_0x21bef8){return _0x21bef8['model'];}))['join'](':');return crypto[_0x5297('0x11')](_0x5297('0x12'))['update'](_0x30d068)[_0x5297('0x13')]('hex');}exports[_0x5297('0x14')]=function(){switch(os[_0x5297('0x15')]()){case'win32':return exec(_0x5297('0x16'),{'encoding':_0x5297('0x17')})[_0x5297('0x18')]('\x0d\x0a','');default:var _0x40afca=getFirstInterface();var _0x1343dd=getCPUhash();var _0x36bc09=_0x1343dd+'|'+os[_0x5297('0x19')]()+'|'+_0x40afca[_0x5297('0x1a')]+'|'+_0x40afca['ipAddress'];var _0x23474a=crypto[_0x5297('0x11')](_0x5297('0x12'))[_0x5297('0x1b')](_0x36bc09)['digest'](_0x5297('0x1c'));return _0x23474a[_0x5297('0x1d')](0x0,0x8)+'-'+_0x23474a['substring'](0x8,0xc)+'-'+_0x23474a[_0x5297('0x1d')](0xc,0x10)+'-'+_0x23474a['substring'](0x10,0x14)+'-'+_0x23474a[_0x5297('0x1d')](0x14);}};
\ No newline at end of file
+var _0xc4c9=['map','model','update','digest','getUuid','licenseToken','test','win32','utf8','replace','hostname','macAddress','ipAddress','createHash','md5','substring','lodash','crypto','bimedia-machine-uuid','execSync','orderBy','keys','length','filter','family','IPv4','internal','mac','00:00:00:00:00:00','address','getFirstInterface','cpus'];(function(_0x16629d,_0x492375){var _0x56ccee=function(_0xa982b7){while(--_0xa982b7){_0x16629d['push'](_0x16629d['shift']());}};_0x56ccee(++_0x492375);}(_0xc4c9,0x150));var _0x9c4c=function(_0x3c1635,_0x3ee62f){_0x3c1635=_0x3c1635-0x0;var _0x41914b=_0xc4c9[_0x3c1635];return _0x41914b;};'use strict';var _=require(_0x9c4c('0x0'));var os=require('os');var crypto=require(_0x9c4c('0x1'));var machine=require(_0x9c4c('0x2'));var exec=require('child_process')[_0x9c4c('0x3')];var config=require('../environment');function getInterfaces(){var _0x397933=[];var _0x5c2c45=os['networkInterfaces']();var _0x8dbec9=_[_0x9c4c('0x4')](_[_0x9c4c('0x5')](_0x5c2c45));for(var _0x5b6d2b=0x0;_0x5b6d2b<_0x8dbec9[_0x9c4c('0x6')];_0x5b6d2b++){var _0x4f4727=_0x5c2c45[_0x8dbec9[_0x5b6d2b]][_0x9c4c('0x7')](function(_0x340f37){return _0x340f37[_0x9c4c('0x8')]===_0x9c4c('0x9')&&_0x340f37[_0x9c4c('0xa')]===![];});_0x397933=_0x397933['concat'](_0x4f4727);}return _0x397933;}function getFirstInterface(){var _0x4a01ea=_['head'](getInterfaces());return{'macAddress':_0x4a01ea&&_0x4a01ea[_0x9c4c('0xb')]?_0x4a01ea[_0x9c4c('0xb')]:_0x9c4c('0xc'),'ipAddress':_0x4a01ea&&_0x4a01ea[_0x9c4c('0xd')]?_0x4a01ea['address']:'127.0.0.1'};}exports[_0x9c4c('0xe')]=getFirstInterface;function getCPUhash(){var _0x400fb5=_[_0x9c4c('0x4')](os[_0x9c4c('0xf')]()[_0x9c4c('0x10')](function(_0x1de02c){return _0x1de02c[_0x9c4c('0x11')];}))['join'](':');return crypto['createHash']('md5')[_0x9c4c('0x12')](_0x400fb5)[_0x9c4c('0x13')]('hex');}exports[_0x9c4c('0x14')]=function(){var _0x29492b=os['platform']();var _0x15fa54=/[0-9a-f-]{36}/;if(config[_0x9c4c('0x15')]&&_0x15fa54[_0x9c4c('0x16')](config[_0x9c4c('0x15')])){return config[_0x9c4c('0x15')];}else if(_0x29492b===_0x9c4c('0x17')){return exec('dmidecode\x20--string\x20system-uuid',{'encoding':_0x9c4c('0x18')})[_0x9c4c('0x19')]('\x0d\x0a','');}else{var _0x446813=getFirstInterface();var _0xe04530=getCPUhash();var _0x298c0c=_0xe04530+'|'+os[_0x9c4c('0x1a')]()+'|'+_0x446813[_0x9c4c('0x1b')]+'|'+_0x446813[_0x9c4c('0x1c')];var _0x5d4208=crypto[_0x9c4c('0x1d')](_0x9c4c('0x1e'))['update'](_0x298c0c)['digest']('hex');return _0x5d4208['substring'](0x0,0x8)+'-'+_0x5d4208['substring'](0x8,0xc)+'-'+_0x5d4208[_0x9c4c('0x1f')](0xc,0x10)+'-'+_0x5d4208[_0x9c4c('0x1f')](0x10,0x14)+'-'+_0x5d4208[_0x9c4c('0x1f')](0x14);}};
\ No newline at end of file