Built motion from commit 00bf23f6.|2.6.16
[motion2.git] / server / config / license / hardware.js
index 454e44c..85cf9e5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3c6c=['macAddress','ipAddress','substring','lodash','bimedia-machine-uuid','child_process','execSync','networkInterfaces','orderBy','concat','mac','00:00:00:00:00:00','address','127.0.0.1','getFirstInterface','map','model','join','createHash','md5','update','digest','hex','getUuid','platform','win32','dmidecode\x20--string\x20system-uuid','utf8','replace','hostname'];(function(_0x2ca60c,_0x3851f1){var _0xa477c4=function(_0x3f10d3){while(--_0x3f10d3){_0x2ca60c['push'](_0x2ca60c['shift']());}};_0xa477c4(++_0x3851f1);}(_0x3c6c,0x7b));var _0xc3c6=function(_0x5b70d8,_0x91fd1f){_0x5b70d8=_0x5b70d8-0x0;var _0x132a95=_0x3c6c[_0x5b70d8];return _0x132a95;};'use strict';var _=require(_0xc3c6('0x0'));var os=require('os');var crypto=require('crypto');var machine=require(_0xc3c6('0x1'));var exec=require(_0xc3c6('0x2'))[_0xc3c6('0x3')];function getInterfaces(){var _0x3d2b3f=[];var _0x16a464=os[_0xc3c6('0x4')]();var _0x65a78=_[_0xc3c6('0x5')](_['keys'](_0x16a464));for(var _0x3c630b=0x0;_0x3c630b<_0x65a78['length'];_0x3c630b++){var _0xe7731e=_0x16a464[_0x65a78[_0x3c630b]]['filter'](function(_0x50cd05){return _0x50cd05['family']==='IPv4'&&_0x50cd05['internal']===![];});_0x3d2b3f=_0x3d2b3f[_0xc3c6('0x6')](_0xe7731e);}return _0x3d2b3f;}function getFirstInterface(){var _0x1c04d4=_['head'](getInterfaces());return{'macAddress':_0x1c04d4&&_0x1c04d4[_0xc3c6('0x7')]?_0x1c04d4[_0xc3c6('0x7')]:_0xc3c6('0x8'),'ipAddress':_0x1c04d4&&_0x1c04d4[_0xc3c6('0x9')]?_0x1c04d4['address']:_0xc3c6('0xa')};}exports[_0xc3c6('0xb')]=getFirstInterface;function getCPUhash(){var _0x1b78ca=_['orderBy'](os['cpus']()[_0xc3c6('0xc')](function(_0x407147){return _0x407147[_0xc3c6('0xd')];}))[_0xc3c6('0xe')](':');return crypto[_0xc3c6('0xf')](_0xc3c6('0x10'))[_0xc3c6('0x11')](_0x1b78ca)[_0xc3c6('0x12')](_0xc3c6('0x13'));}exports[_0xc3c6('0x14')]=function(){switch(os[_0xc3c6('0x15')]()){case _0xc3c6('0x16'):return exec(_0xc3c6('0x17'),{'encoding':_0xc3c6('0x18')})[_0xc3c6('0x19')]('\x0d\x0a','');default:var _0x42c631=getFirstInterface();var _0x32c52f=getCPUhash();var _0x181b3b=_0x32c52f+'|'+os[_0xc3c6('0x1a')]()+'|'+_0x42c631[_0xc3c6('0x1b')]+'|'+_0x42c631[_0xc3c6('0x1c')];var _0x15ebec=crypto[_0xc3c6('0xf')](_0xc3c6('0x10'))[_0xc3c6('0x11')](_0x181b3b)[_0xc3c6('0x12')]('hex');return _0x15ebec[_0xc3c6('0x1d')](0x0,0x8)+'-'+_0x15ebec[_0xc3c6('0x1d')](0x8,0xc)+'-'+_0x15ebec[_0xc3c6('0x1d')](0xc,0x10)+'-'+_0x15ebec[_0xc3c6('0x1d')](0x10,0x14)+'-'+_0x15ebec[_0xc3c6('0x1d')](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