Built motion from commit 00bf23f6.|2.6.16
[motion2.git] / server / config / license / hardware.js
index fea426f..85cf9e5 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 _0x4eca=['keys','filter','family','IPv4','concat','head','mac','00:00:00:00:00:00','address','127.0.0.1','orderBy','map','model','join','createHash','update','getUuid','test','licenseToken','win32','dmidecode\x20--string\x20system-uuid','utf8','replace','md5','digest','hex','substring','lodash','crypto','bimedia-machine-uuid','child_process','execSync','../environment','networkInterfaces'];(function(_0x84bd8c,_0x498d95){var _0x9a8624=function(_0x162357){while(--_0x162357){_0x84bd8c['push'](_0x84bd8c['shift']());}};_0x9a8624(++_0x498d95);}(_0x4eca,0x109));var _0xa4ec=function(_0x17dfcc,_0x4cd857){_0x17dfcc=_0x17dfcc-0x0;var _0x55254c=_0x4eca[_0x17dfcc];return _0x55254c;};'use strict';var _=require(_0xa4ec('0x0'));var os=require('os');var crypto=require(_0xa4ec('0x1'));var machine=require(_0xa4ec('0x2'));var exec=require(_0xa4ec('0x3'))[_0xa4ec('0x4')];var config=require(_0xa4ec('0x5'));function getInterfaces(){var _0x447dee=[];var _0x37ceea=os[_0xa4ec('0x6')]();var _0x3ad854=_['orderBy'](_[_0xa4ec('0x7')](_0x37ceea));for(var _0x3c3994=0x0;_0x3c3994<_0x3ad854['length'];_0x3c3994++){var _0xdd0900=_0x37ceea[_0x3ad854[_0x3c3994]][_0xa4ec('0x8')](function(_0x7c5ecf){return _0x7c5ecf[_0xa4ec('0x9')]===_0xa4ec('0xa')&&_0x7c5ecf['internal']===![];});_0x447dee=_0x447dee[_0xa4ec('0xb')](_0xdd0900);}return _0x447dee;}function getFirstInterface(){var _0x1657dc=_[_0xa4ec('0xc')](getInterfaces());return{'macAddress':_0x1657dc&&_0x1657dc[_0xa4ec('0xd')]?_0x1657dc[_0xa4ec('0xd')]:_0xa4ec('0xe'),'ipAddress':_0x1657dc&&_0x1657dc[_0xa4ec('0xf')]?_0x1657dc[_0xa4ec('0xf')]:_0xa4ec('0x10')};}exports['getFirstInterface']=getFirstInterface;function getCPUhash(){var _0xb575f6=_[_0xa4ec('0x11')](os['cpus']()[_0xa4ec('0x12')](function(_0x2eb5af){return _0x2eb5af[_0xa4ec('0x13')];}))[_0xa4ec('0x14')](':');return crypto[_0xa4ec('0x15')]('md5')[_0xa4ec('0x16')](_0xb575f6)['digest']('hex');}exports[_0xa4ec('0x17')]=function(){var _0xae62ca=os['platform']();var _0x538137=/[0-9a-f-]{36}/;if(config['licenseToken']&&_0x538137[_0xa4ec('0x18')](config[_0xa4ec('0x19')])){return config['licenseToken'];}else if(_0xae62ca===_0xa4ec('0x1a')){return exec(_0xa4ec('0x1b'),{'encoding':_0xa4ec('0x1c')})[_0xa4ec('0x1d')]('\x0d\x0a','');}else{var _0x318ebf=getFirstInterface();var _0x26e826=getCPUhash();var _0x1f294b=_0x26e826+'|'+os['hostname']()+'|'+_0x318ebf['macAddress']+'|'+_0x318ebf['ipAddress'];var _0x5c89b2=crypto['createHash'](_0xa4ec('0x1e'))[_0xa4ec('0x16')](_0x1f294b)[_0xa4ec('0x1f')](_0xa4ec('0x20'));return _0x5c89b2[_0xa4ec('0x21')](0x0,0x8)+'-'+_0x5c89b2[_0xa4ec('0x21')](0x8,0xc)+'-'+_0x5c89b2[_0xa4ec('0x21')](0xc,0x10)+'-'+_0x5c89b2[_0xa4ec('0x21')](0x10,0x14)+'-'+_0x5c89b2['substring'](0x14);}};
\ No newline at end of file