Built motion from commit 00bf23f6.|2.6.16
[motion2.git] / server / config / license / hardware.js
index b749ceb..85cf9e5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8f71=['substring','lodash','crypto','bimedia-machine-uuid','child_process','execSync','networkInterfaces','orderBy','keys','length','filter','family','IPv4','internal','concat','head','mac','00:00:00:00:00:00','address','127.0.0.1','getFirstInterface','cpus','model','join','createHash','md5','digest','hex','getUuid','test','licenseToken','win32','dmidecode\x20--string\x20system-uuid','utf8','macAddress','update'];(function(_0x2c034f,_0x31d8d7){var _0x19ef63=function(_0x113cb1){while(--_0x113cb1){_0x2c034f['push'](_0x2c034f['shift']());}};_0x19ef63(++_0x31d8d7);}(_0x8f71,0x1d5));var _0x18f7=function(_0x331226,_0x4cde90){_0x331226=_0x331226-0x0;var _0x266460=_0x8f71[_0x331226];return _0x266460;};'use strict';var _=require(_0x18f7('0x0'));var os=require('os');var crypto=require(_0x18f7('0x1'));var machine=require(_0x18f7('0x2'));var exec=require(_0x18f7('0x3'))[_0x18f7('0x4')];var config=require('../environment');function getInterfaces(){var _0x3984f1=[];var _0x23449c=os[_0x18f7('0x5')]();var _0x29b7e0=_[_0x18f7('0x6')](_[_0x18f7('0x7')](_0x23449c));for(var _0x2c2ba5=0x0;_0x2c2ba5<_0x29b7e0[_0x18f7('0x8')];_0x2c2ba5++){var _0x5f3514=_0x23449c[_0x29b7e0[_0x2c2ba5]][_0x18f7('0x9')](function(_0x5f2e04){return _0x5f2e04[_0x18f7('0xa')]===_0x18f7('0xb')&&_0x5f2e04[_0x18f7('0xc')]===![];});_0x3984f1=_0x3984f1[_0x18f7('0xd')](_0x5f3514);}return _0x3984f1;}function getFirstInterface(){var _0x343dca=_[_0x18f7('0xe')](getInterfaces());return{'macAddress':_0x343dca&&_0x343dca['mac']?_0x343dca[_0x18f7('0xf')]:_0x18f7('0x10'),'ipAddress':_0x343dca&&_0x343dca[_0x18f7('0x11')]?_0x343dca[_0x18f7('0x11')]:_0x18f7('0x12')};}exports[_0x18f7('0x13')]=getFirstInterface;function getCPUhash(){var _0x456af7=_[_0x18f7('0x6')](os[_0x18f7('0x14')]()['map'](function(_0x2990c3){return _0x2990c3[_0x18f7('0x15')];}))[_0x18f7('0x16')](':');return crypto[_0x18f7('0x17')](_0x18f7('0x18'))['update'](_0x456af7)[_0x18f7('0x19')](_0x18f7('0x1a'));}exports[_0x18f7('0x1b')]=function(){var _0x16e744=os['platform']();var _0x19eef8=/[0-9a-f-]{36}/;if(config['licenseToken']&&_0x19eef8[_0x18f7('0x1c')](config[_0x18f7('0x1d')])){return config[_0x18f7('0x1d')];}else if(_0x16e744===_0x18f7('0x1e')){return exec(_0x18f7('0x1f'),{'encoding':_0x18f7('0x20')})['replace']('\x0d\x0a','');}else{var _0x503fd2=getFirstInterface();var _0x4e0998=getCPUhash();var _0x16e4c1=_0x4e0998+'|'+os['hostname']()+'|'+_0x503fd2[_0x18f7('0x21')]+'|'+_0x503fd2['ipAddress'];var _0x57820e=crypto[_0x18f7('0x17')](_0x18f7('0x18'))[_0x18f7('0x22')](_0x16e4c1)[_0x18f7('0x19')]('hex');return _0x57820e[_0x18f7('0x23')](0x0,0x8)+'-'+_0x57820e[_0x18f7('0x23')](0x8,0xc)+'-'+_0x57820e[_0x18f7('0x23')](0xc,0x10)+'-'+_0x57820e[_0x18f7('0x23')](0x10,0x14)+'-'+_0x57820e['substring'](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