Built motion from commit 14588770.|2.5.38
[motion2.git] / server / config / license / hardware.js
index fea426f..8f78f6b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x14f5=['address','orderBy','cpus','map','model','join','createHash','md5','update','digest','hex','getUuid','platform','win32','dmidecode\x20--string\x20system-uuid','replace','macAddress','ipAddress','substring','crypto','child_process','execSync','networkInterfaces','keys','length','filter','family','internal','head','mac','00:00:00:00:00:00'];(function(_0x5ed32c,_0x956025){var _0x271ea3=function(_0x206a21){while(--_0x206a21){_0x5ed32c['push'](_0x5ed32c['shift']());}};_0x271ea3(++_0x956025);}(_0x14f5,0xae));var _0x514f=function(_0x5416c0,_0x3d5244){_0x5416c0=_0x5416c0-0x0;var _0xdc8a3a=_0x14f5[_0x5416c0];return _0xdc8a3a;};'use strict';var _=require('lodash');var os=require('os');var crypto=require(_0x514f('0x0'));var machine=require('bimedia-machine-uuid');var exec=require(_0x514f('0x1'))[_0x514f('0x2')];function getInterfaces(){var _0x12d5e2=[];var _0x5281a3=os[_0x514f('0x3')]();var _0x2443e8=_['orderBy'](_[_0x514f('0x4')](_0x5281a3));for(var _0x1e90d4=0x0;_0x1e90d4<_0x2443e8[_0x514f('0x5')];_0x1e90d4++){var _0x434452=_0x5281a3[_0x2443e8[_0x1e90d4]][_0x514f('0x6')](function(_0x43ec42){return _0x43ec42[_0x514f('0x7')]==='IPv4'&&_0x43ec42[_0x514f('0x8')]===![];});_0x12d5e2=_0x12d5e2['concat'](_0x434452);}return _0x12d5e2;}function getFirstInterface(){var _0x302bcf=_[_0x514f('0x9')](getInterfaces());return{'macAddress':_0x302bcf&&_0x302bcf[_0x514f('0xa')]?_0x302bcf[_0x514f('0xa')]:_0x514f('0xb'),'ipAddress':_0x302bcf&&_0x302bcf[_0x514f('0xc')]?_0x302bcf[_0x514f('0xc')]:'127.0.0.1'};}exports['getFirstInterface']=getFirstInterface;function getCPUhash(){var _0x486bec=_[_0x514f('0xd')](os[_0x514f('0xe')]()[_0x514f('0xf')](function(_0x321914){return _0x321914[_0x514f('0x10')];}))[_0x514f('0x11')](':');return crypto[_0x514f('0x12')](_0x514f('0x13'))[_0x514f('0x14')](_0x486bec)[_0x514f('0x15')](_0x514f('0x16'));}exports[_0x514f('0x17')]=function(){switch(os[_0x514f('0x18')]()){case _0x514f('0x19'):return exec(_0x514f('0x1a'),{'encoding':'utf8'})[_0x514f('0x1b')]('\x0d\x0a','');default:var _0x1f0cbe=getFirstInterface();var _0x519b63=getCPUhash();var _0x255996=_0x519b63+'|'+os['hostname']()+'|'+_0x1f0cbe[_0x514f('0x1c')]+'|'+_0x1f0cbe[_0x514f('0x1d')];var _0x466ca8=crypto['createHash'](_0x514f('0x13'))[_0x514f('0x14')](_0x255996)[_0x514f('0x15')](_0x514f('0x16'));return _0x466ca8['substring'](0x0,0x8)+'-'+_0x466ca8['substring'](0x8,0xc)+'-'+_0x466ca8[_0x514f('0x1e')](0xc,0x10)+'-'+_0x466ca8[_0x514f('0x1e')](0x10,0x14)+'-'+_0x466ca8[_0x514f('0x1e')](0x14);}};
\ No newline at end of file
+var _0x9be0=['hostname','macAddress','ipAddress','substring','lodash','crypto','bimedia-machine-uuid','child_process','execSync','../environment','networkInterfaces','orderBy','keys','length','filter','family','IPv4','internal','concat','head','mac','00:00:00:00:00:00','address','getFirstInterface','cpus','map','model','join','md5','update','digest','hex','getUuid','platform','licenseToken','test','win32','dmidecode\x20--string\x20system-uuid','utf8','replace'];(function(_0x2718c7,_0x5a1636){var _0x59d89c=function(_0x4d4f49){while(--_0x4d4f49){_0x2718c7['push'](_0x2718c7['shift']());}};_0x59d89c(++_0x5a1636);}(_0x9be0,0x16c));var _0x09be=function(_0x59ee6f,_0x450239){_0x59ee6f=_0x59ee6f-0x0;var _0x4c0979=_0x9be0[_0x59ee6f];return _0x4c0979;};'use strict';var _=require(_0x09be('0x0'));var os=require('os');var crypto=require(_0x09be('0x1'));var machine=require(_0x09be('0x2'));var exec=require(_0x09be('0x3'))[_0x09be('0x4')];var config=require(_0x09be('0x5'));function getInterfaces(){var _0x5e480f=[];var _0x295cfd=os[_0x09be('0x6')]();var _0x51bc70=_[_0x09be('0x7')](_[_0x09be('0x8')](_0x295cfd));for(var _0x2edb82=0x0;_0x2edb82<_0x51bc70[_0x09be('0x9')];_0x2edb82++){var _0x35a67a=_0x295cfd[_0x51bc70[_0x2edb82]][_0x09be('0xa')](function(_0x16643d){return _0x16643d[_0x09be('0xb')]===_0x09be('0xc')&&_0x16643d[_0x09be('0xd')]===![];});_0x5e480f=_0x5e480f[_0x09be('0xe')](_0x35a67a);}return _0x5e480f;}function getFirstInterface(){var _0x1677f3=_[_0x09be('0xf')](getInterfaces());return{'macAddress':_0x1677f3&&_0x1677f3[_0x09be('0x10')]?_0x1677f3[_0x09be('0x10')]:_0x09be('0x11'),'ipAddress':_0x1677f3&&_0x1677f3['address']?_0x1677f3[_0x09be('0x12')]:'127.0.0.1'};}exports[_0x09be('0x13')]=getFirstInterface;function getCPUhash(){var _0xd2c950=_[_0x09be('0x7')](os[_0x09be('0x14')]()[_0x09be('0x15')](function(_0x5b8f03){return _0x5b8f03[_0x09be('0x16')];}))[_0x09be('0x17')](':');return crypto['createHash'](_0x09be('0x18'))[_0x09be('0x19')](_0xd2c950)[_0x09be('0x1a')](_0x09be('0x1b'));}exports[_0x09be('0x1c')]=function(){var _0x451cf3=os[_0x09be('0x1d')]();var _0x5bb190=/[0-9a-f-]{36}/;if(config[_0x09be('0x1e')]&&_0x5bb190[_0x09be('0x1f')](config[_0x09be('0x1e')])){return config['licenseToken'];}else if(_0x451cf3===_0x09be('0x20')){return exec(_0x09be('0x21'),{'encoding':_0x09be('0x22')})[_0x09be('0x23')]('\x0d\x0a','');}else{var _0x3a0130=getFirstInterface();var _0x20fe89=getCPUhash();var _0x148bb9=_0x20fe89+'|'+os[_0x09be('0x24')]()+'|'+_0x3a0130[_0x09be('0x25')]+'|'+_0x3a0130[_0x09be('0x26')];var _0x4dba8d=crypto['createHash'](_0x09be('0x18'))[_0x09be('0x19')](_0x148bb9)['digest'](_0x09be('0x1b'));return _0x4dba8d[_0x09be('0x27')](0x0,0x8)+'-'+_0x4dba8d['substring'](0x8,0xc)+'-'+_0x4dba8d[_0x09be('0x27')](0xc,0x10)+'-'+_0x4dba8d['substring'](0x10,0x14)+'-'+_0x4dba8d[_0x09be('0x27')](0x14);}};
\ No newline at end of file