Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / config / license / hardware.js
index b749ceb..d7acf9c 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 _0xc763=['model','join','update','digest','hex','licenseToken','test','win32','dmidecode\x20--string\x20system-uuid','replace','hostname','ipAddress','createHash','md5','substring','lodash','bimedia-machine-uuid','child_process','execSync','../environment','orderBy','filter','family','internal','concat','head','mac','00:00:00:00:00:00','address','cpus','map'];(function(_0x52c1e0,_0x1d7896){var _0x39acfc=function(_0x4529fb){while(--_0x4529fb){_0x52c1e0['push'](_0x52c1e0['shift']());}};_0x39acfc(++_0x1d7896);}(_0xc763,0x107));var _0x3c76=function(_0x3ab0ea,_0x56dfec){_0x3ab0ea=_0x3ab0ea-0x0;var _0x554187=_0xc763[_0x3ab0ea];return _0x554187;};'use strict';var _=require(_0x3c76('0x0'));var os=require('os');var crypto=require('crypto');var machine=require(_0x3c76('0x1'));var exec=require(_0x3c76('0x2'))[_0x3c76('0x3')];var config=require(_0x3c76('0x4'));function getInterfaces(){var _0x39caf3=[];var _0x1fc0c3=os['networkInterfaces']();var _0x814a95=_[_0x3c76('0x5')](_['keys'](_0x1fc0c3));for(var _0x4f0f10=0x0;_0x4f0f10<_0x814a95['length'];_0x4f0f10++){var _0xae78c7=_0x1fc0c3[_0x814a95[_0x4f0f10]][_0x3c76('0x6')](function(_0x40974f){return _0x40974f[_0x3c76('0x7')]==='IPv4'&&_0x40974f[_0x3c76('0x8')]===![];});_0x39caf3=_0x39caf3[_0x3c76('0x9')](_0xae78c7);}return _0x39caf3;}function getFirstInterface(){var _0xc45dbc=_[_0x3c76('0xa')](getInterfaces());return{'macAddress':_0xc45dbc&&_0xc45dbc[_0x3c76('0xb')]?_0xc45dbc[_0x3c76('0xb')]:_0x3c76('0xc'),'ipAddress':_0xc45dbc&&_0xc45dbc[_0x3c76('0xd')]?_0xc45dbc[_0x3c76('0xd')]:'127.0.0.1'};}exports['getFirstInterface']=getFirstInterface;function getCPUhash(){var _0x132ca4=_[_0x3c76('0x5')](os[_0x3c76('0xe')]()[_0x3c76('0xf')](function(_0x21a763){return _0x21a763[_0x3c76('0x10')];}))[_0x3c76('0x11')](':');return crypto['createHash']('md5')[_0x3c76('0x12')](_0x132ca4)[_0x3c76('0x13')](_0x3c76('0x14'));}exports['getUuid']=function(){var _0x40cd21=os['platform']();var _0x33da9d=/[0-9a-f-]{36}/;if(config[_0x3c76('0x15')]&&_0x33da9d[_0x3c76('0x16')](config['licenseToken'])){return config['licenseToken'];}else if(_0x40cd21===_0x3c76('0x17')){return exec(_0x3c76('0x18'),{'encoding':'utf8'})[_0x3c76('0x19')]('\x0d\x0a','');}else{var _0x295475=getFirstInterface();var _0x14c3cf=getCPUhash();var _0x53d019=_0x14c3cf+'|'+os[_0x3c76('0x1a')]()+'|'+_0x295475['macAddress']+'|'+_0x295475[_0x3c76('0x1b')];var _0xba90=crypto[_0x3c76('0x1c')](_0x3c76('0x1d'))[_0x3c76('0x12')](_0x53d019)[_0x3c76('0x13')](_0x3c76('0x14'));return _0xba90[_0x3c76('0x1e')](0x0,0x8)+'-'+_0xba90[_0x3c76('0x1e')](0x8,0xc)+'-'+_0xba90[_0x3c76('0x1e')](0xc,0x10)+'-'+_0xba90['substring'](0x10,0x14)+'-'+_0xba90['substring'](0x14);}};
\ No newline at end of file