Built motion from commit ffdca78c.|2.6.24
[motion2.git] / server / config / license / hardware.js
index bf31adb..578b8af 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf809=['IPv4','concat','head','mac','00:00:00:00:00:00','address','orderBy','cpus','map','model','join','md5','update','digest','hex','licenseToken','test','win32','dmidecode\x20--string\x20system-uuid','hostname','ipAddress','createHash','substring','bimedia-machine-uuid','child_process','execSync','networkInterfaces','family'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xf809,0x167));var _0x9f80=function(_0x921ae,_0x54df65){_0x921ae=_0x921ae-0x0;var _0x353e3a=_0xf809[_0x921ae];return _0x353e3a;};'use strict';var _=require('lodash');var os=require('os');var crypto=require('crypto');var machine=require(_0x9f80('0x0'));var exec=require(_0x9f80('0x1'))[_0x9f80('0x2')];var config=require('../environment');function getInterfaces(){var _0x4ef104=[];var _0x209a5b=os[_0x9f80('0x3')]();var _0x483165=_['orderBy'](_['keys'](_0x209a5b));for(var _0x700e09=0x0;_0x700e09<_0x483165['length'];_0x700e09++){var _0x26b31c=_0x209a5b[_0x483165[_0x700e09]]['filter'](function(_0x4e7bcb){return _0x4e7bcb[_0x9f80('0x4')]===_0x9f80('0x5')&&_0x4e7bcb['internal']===![];});_0x4ef104=_0x4ef104[_0x9f80('0x6')](_0x26b31c);}return _0x4ef104;}function getFirstInterface(){var _0x2d4a22=_[_0x9f80('0x7')](getInterfaces());return{'macAddress':_0x2d4a22&&_0x2d4a22[_0x9f80('0x8')]?_0x2d4a22['mac']:_0x9f80('0x9'),'ipAddress':_0x2d4a22&&_0x2d4a22[_0x9f80('0xa')]?_0x2d4a22['address']:'127.0.0.1'};}exports['getFirstInterface']=getFirstInterface;function getCPUhash(){var _0x55442b=_[_0x9f80('0xb')](os[_0x9f80('0xc')]()[_0x9f80('0xd')](function(_0x5b7a2c){return _0x5b7a2c[_0x9f80('0xe')];}))[_0x9f80('0xf')](':');return crypto['createHash'](_0x9f80('0x10'))[_0x9f80('0x11')](_0x55442b)[_0x9f80('0x12')](_0x9f80('0x13'));}exports['getUuid']=function(){var _0x5446a7=os['platform']();var _0x4cc077=/[0-9a-f-]{36}/;if(config[_0x9f80('0x14')]&&_0x4cc077[_0x9f80('0x15')](config['licenseToken'])){return config[_0x9f80('0x14')];}else if(_0x5446a7===_0x9f80('0x16')){return exec(_0x9f80('0x17'),{'encoding':'utf8'})['replace']('\x0d\x0a','');}else{var _0x164f68=getFirstInterface();var _0x1d911c=getCPUhash();var _0x283c8c=_0x1d911c+'|'+os[_0x9f80('0x18')]()+'|'+_0x164f68['macAddress']+'|'+_0x164f68[_0x9f80('0x19')];var _0x59a90d=crypto[_0x9f80('0x1a')](_0x9f80('0x10'))[_0x9f80('0x11')](_0x283c8c)[_0x9f80('0x12')]('hex');return _0x59a90d[_0x9f80('0x1b')](0x0,0x8)+'-'+_0x59a90d['substring'](0x8,0xc)+'-'+_0x59a90d['substring'](0xc,0x10)+'-'+_0x59a90d[_0x9f80('0x1b')](0x10,0x14)+'-'+_0x59a90d['substring'](0x14);}};
\ No newline at end of file
+var _0xc953=['macAddress','ipAddress','md5','hex','substring','lodash','crypto','bimedia-machine-uuid','child_process','execSync','keys','filter','family','IPv4','internal','concat','head','mac','00:00:00:00:00:00','address','127.0.0.1','orderBy','cpus','model','join','createHash','update','digest','getUuid','platform','licenseToken','test','win32','dmidecode\x20--string\x20system-uuid','utf8','replace','hostname'];(function(_0x47604d,_0x15a014){var _0x388e4c=function(_0x42a446){while(--_0x42a446){_0x47604d['push'](_0x47604d['shift']());}};_0x388e4c(++_0x15a014);}(_0xc953,0x12d));var _0x3c95=function(_0x4ed32d,_0x327695){_0x4ed32d=_0x4ed32d-0x0;var _0xf624df=_0xc953[_0x4ed32d];return _0xf624df;};'use strict';var _=require(_0x3c95('0x0'));var os=require('os');var crypto=require(_0x3c95('0x1'));var machine=require(_0x3c95('0x2'));var exec=require(_0x3c95('0x3'))[_0x3c95('0x4')];var config=require('../environment');function getInterfaces(){var _0x455341=[];var _0x1034c3=os['networkInterfaces']();var _0x36088d=_['orderBy'](_[_0x3c95('0x5')](_0x1034c3));for(var _0x35e914=0x0;_0x35e914<_0x36088d['length'];_0x35e914++){var _0x41af48=_0x1034c3[_0x36088d[_0x35e914]][_0x3c95('0x6')](function(_0x40ce6a){return _0x40ce6a[_0x3c95('0x7')]===_0x3c95('0x8')&&_0x40ce6a[_0x3c95('0x9')]===![];});_0x455341=_0x455341[_0x3c95('0xa')](_0x41af48);}return _0x455341;}function getFirstInterface(){var _0x470e49=_[_0x3c95('0xb')](getInterfaces());return{'macAddress':_0x470e49&&_0x470e49[_0x3c95('0xc')]?_0x470e49[_0x3c95('0xc')]:_0x3c95('0xd'),'ipAddress':_0x470e49&&_0x470e49[_0x3c95('0xe')]?_0x470e49[_0x3c95('0xe')]:_0x3c95('0xf')};}exports['getFirstInterface']=getFirstInterface;function getCPUhash(){var _0xc16a94=_[_0x3c95('0x10')](os[_0x3c95('0x11')]()['map'](function(_0x2bdbb9){return _0x2bdbb9[_0x3c95('0x12')];}))[_0x3c95('0x13')](':');return crypto[_0x3c95('0x14')]('md5')[_0x3c95('0x15')](_0xc16a94)[_0x3c95('0x16')]('hex');}exports[_0x3c95('0x17')]=function(){var _0x1307af=os[_0x3c95('0x18')]();var _0x1fe57e=/[0-9a-f-]{36}/;if(config[_0x3c95('0x19')]&&_0x1fe57e[_0x3c95('0x1a')](config['licenseToken'])){return config[_0x3c95('0x19')];}else if(_0x1307af===_0x3c95('0x1b')){return exec(_0x3c95('0x1c'),{'encoding':_0x3c95('0x1d')})[_0x3c95('0x1e')]('\x0d\x0a','');}else{var _0x55b986=getFirstInterface();var _0x432cfb=getCPUhash();var _0x37a413=_0x432cfb+'|'+os[_0x3c95('0x1f')]()+'|'+_0x55b986[_0x3c95('0x20')]+'|'+_0x55b986[_0x3c95('0x21')];var _0x44ae9d=crypto[_0x3c95('0x14')](_0x3c95('0x22'))['update'](_0x37a413)[_0x3c95('0x16')](_0x3c95('0x23'));return _0x44ae9d[_0x3c95('0x24')](0x0,0x8)+'-'+_0x44ae9d['substring'](0x8,0xc)+'-'+_0x44ae9d[_0x3c95('0x24')](0xc,0x10)+'-'+_0x44ae9d[_0x3c95('0x24')](0x10,0x14)+'-'+_0x44ae9d[_0x3c95('0x24')](0x14);}};
\ No newline at end of file