Built motion from commit da617fac.|2.6.6
[motion2.git] / server / config / license / hardware.js
index 1b1334d..0ac2b8a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaf1b=['hostname','macAddress','substring','lodash','crypto','bimedia-machine-uuid','child_process','execSync','networkInterfaces','orderBy','keys','length','IPv4','concat','head','mac','00:00:00:00:00:00','address','getFirstInterface','cpus','map','createHash','md5','update','digest','hex','getUuid','platform','dmidecode\x20--string\x20system-uuid','utf8','replace'];(function(_0x531037,_0x3aa504){var _0x1e6564=function(_0xa35fa8){while(--_0xa35fa8){_0x531037['push'](_0x531037['shift']());}};_0x1e6564(++_0x3aa504);}(_0xaf1b,0x11a));var _0xbaf1=function(_0x4fce7e,_0x1e23e1){_0x4fce7e=_0x4fce7e-0x0;var _0x2b2aa1=_0xaf1b[_0x4fce7e];return _0x2b2aa1;};'use strict';var _=require(_0xbaf1('0x0'));var os=require('os');var crypto=require(_0xbaf1('0x1'));var machine=require(_0xbaf1('0x2'));var exec=require(_0xbaf1('0x3'))[_0xbaf1('0x4')];function getInterfaces(){var _0x132c6a=[];var _0x3631fb=os[_0xbaf1('0x5')]();var _0x461ffb=_[_0xbaf1('0x6')](_[_0xbaf1('0x7')](_0x3631fb));for(var _0x97aab=0x0;_0x97aab<_0x461ffb[_0xbaf1('0x8')];_0x97aab++){var _0x2f05ad=_0x3631fb[_0x461ffb[_0x97aab]]['filter'](function(_0x2e05b5){return _0x2e05b5['family']===_0xbaf1('0x9')&&_0x2e05b5['internal']===![];});_0x132c6a=_0x132c6a[_0xbaf1('0xa')](_0x2f05ad);}return _0x132c6a;}function getFirstInterface(){var _0x3723ae=_[_0xbaf1('0xb')](getInterfaces());return{'macAddress':_0x3723ae&&_0x3723ae['mac']?_0x3723ae[_0xbaf1('0xc')]:_0xbaf1('0xd'),'ipAddress':_0x3723ae&&_0x3723ae['address']?_0x3723ae[_0xbaf1('0xe')]:'127.0.0.1'};}exports[_0xbaf1('0xf')]=getFirstInterface;function getCPUhash(){var _0x418d09=_[_0xbaf1('0x6')](os[_0xbaf1('0x10')]()[_0xbaf1('0x11')](function(_0x36ec1c){return _0x36ec1c['model'];}))['join'](':');return crypto[_0xbaf1('0x12')](_0xbaf1('0x13'))[_0xbaf1('0x14')](_0x418d09)[_0xbaf1('0x15')](_0xbaf1('0x16'));}exports[_0xbaf1('0x17')]=function(){switch(os[_0xbaf1('0x18')]()){case'win32':return exec(_0xbaf1('0x19'),{'encoding':_0xbaf1('0x1a')})[_0xbaf1('0x1b')]('\x0d\x0a','');default:var _0x342c11=getFirstInterface();var _0x305c91=getCPUhash();var _0x25458f=_0x305c91+'|'+os[_0xbaf1('0x1c')]()+'|'+_0x342c11[_0xbaf1('0x1d')]+'|'+_0x342c11['ipAddress'];var _0x33c23b=crypto['createHash'](_0xbaf1('0x13'))[_0xbaf1('0x14')](_0x25458f)[_0xbaf1('0x15')](_0xbaf1('0x16'));return _0x33c23b['substring'](0x0,0x8)+'-'+_0x33c23b[_0xbaf1('0x1e')](0x8,0xc)+'-'+_0x33c23b['substring'](0xc,0x10)+'-'+_0x33c23b[_0xbaf1('0x1e')](0x10,0x14)+'-'+_0x33c23b[_0xbaf1('0x1e')](0x14);}};
\ No newline at end of file
+var _0xec13=['crypto','child_process','networkInterfaces','orderBy','keys','filter','family','IPv4','concat','head','mac','00:00:00:00:00:00','127.0.0.1','getFirstInterface','model','join','createHash','md5','update','digest','hex','getUuid','licenseToken','test','dmidecode\x20--string\x20system-uuid','utf8','replace','hostname','macAddress','ipAddress','substring','lodash'];(function(_0x27ee8a,_0x4f35a6){var _0xc6d430=function(_0x24027a){while(--_0x24027a){_0x27ee8a['push'](_0x27ee8a['shift']());}};_0xc6d430(++_0x4f35a6);}(_0xec13,0x9f));var _0x3ec1=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0xec13[_0x501510];return _0x1e6ee5;};'use strict';var _=require(_0x3ec1('0x0'));var os=require('os');var crypto=require(_0x3ec1('0x1'));var machine=require('bimedia-machine-uuid');var exec=require(_0x3ec1('0x2'))['execSync'];var config=require('../environment');function getInterfaces(){var _0x3619d9=[];var _0xe39419=os[_0x3ec1('0x3')]();var _0x28dbd4=_[_0x3ec1('0x4')](_[_0x3ec1('0x5')](_0xe39419));for(var _0x5897ab=0x0;_0x5897ab<_0x28dbd4['length'];_0x5897ab++){var _0x35c89d=_0xe39419[_0x28dbd4[_0x5897ab]][_0x3ec1('0x6')](function(_0x12baec){return _0x12baec[_0x3ec1('0x7')]===_0x3ec1('0x8')&&_0x12baec['internal']===![];});_0x3619d9=_0x3619d9[_0x3ec1('0x9')](_0x35c89d);}return _0x3619d9;}function getFirstInterface(){var _0x170076=_[_0x3ec1('0xa')](getInterfaces());return{'macAddress':_0x170076&&_0x170076[_0x3ec1('0xb')]?_0x170076[_0x3ec1('0xb')]:_0x3ec1('0xc'),'ipAddress':_0x170076&&_0x170076['address']?_0x170076['address']:_0x3ec1('0xd')};}exports[_0x3ec1('0xe')]=getFirstInterface;function getCPUhash(){var _0x516996=_[_0x3ec1('0x4')](os['cpus']()['map'](function(_0x2a1e4a){return _0x2a1e4a[_0x3ec1('0xf')];}))[_0x3ec1('0x10')](':');return crypto[_0x3ec1('0x11')](_0x3ec1('0x12'))[_0x3ec1('0x13')](_0x516996)[_0x3ec1('0x14')](_0x3ec1('0x15'));}exports[_0x3ec1('0x16')]=function(){var _0x2af99b=os['platform']();var _0x5de7c7=/[0-9a-f-]{36}/;if(config[_0x3ec1('0x17')]&&_0x5de7c7[_0x3ec1('0x18')](config['licenseToken'])){return config[_0x3ec1('0x17')];}else if(_0x2af99b==='win32'){return exec(_0x3ec1('0x19'),{'encoding':_0x3ec1('0x1a')})[_0x3ec1('0x1b')]('\x0d\x0a','');}else{var _0x43ee8e=getFirstInterface();var _0x2f68fa=getCPUhash();var _0x2f2cd0=_0x2f68fa+'|'+os[_0x3ec1('0x1c')]()+'|'+_0x43ee8e[_0x3ec1('0x1d')]+'|'+_0x43ee8e[_0x3ec1('0x1e')];var _0x1dea5a=crypto[_0x3ec1('0x11')](_0x3ec1('0x12'))[_0x3ec1('0x13')](_0x2f2cd0)['digest'](_0x3ec1('0x15'));return _0x1dea5a['substring'](0x0,0x8)+'-'+_0x1dea5a[_0x3ec1('0x1f')](0x8,0xc)+'-'+_0x1dea5a[_0x3ec1('0x1f')](0xc,0x10)+'-'+_0x1dea5a[_0x3ec1('0x1f')](0x10,0x14)+'-'+_0x1dea5a['substring'](0x14);}};
\ No newline at end of file