Built motion from commit c49361c37b5f784889c8087ac6e0e91b7e6b561a. Version 3.0.0...
[motion-next.git] / server / config / license / hardware.js
1 const a843_0x4207=['../config.service','crypto','hex','00:00:00:00:00:00','address','length','join','child_process','exports','createHash','127.0.0.1','orderBy','head','family','replace','macAddress','substring','ipAddress','lodash','win32','mac','map','digest','md5','execSync','test','platform','keys','update','devLicense'];(function(_0x58c0db,_0x420764){const _0x300a7c=function(_0x1d8070){while(--_0x1d8070){_0x58c0db['push'](_0x58c0db['shift']());}};_0x300a7c(++_0x420764);}(a843_0x4207,0x10b));const a843_0x300a=function(_0x58c0db,_0x420764){_0x58c0db=_0x58c0db-0x0;let _0x300a7c=a843_0x4207[_0x58c0db];return _0x300a7c;};const _0x1d54a8=a843_0x300a;'use strict';const _=require(_0x1d54a8('0x15')),os=require('os'),crypto=require(_0x1d54a8('0x4')),{getConfigService}=require(_0x1d54a8('0x3')),exec=require(_0x1d54a8('0xa'))[_0x1d54a8('0x1b')];function getInterfaces(){const _0x51683b=_0x1d54a8;let _0x1d8070=[];const _0x1957b7=os['networkInterfaces'](),_0x375a0d=_[_0x51683b('0xe')](_[_0x51683b('0x0')](_0x1957b7));for(let _0x264818=0x0;_0x264818<_0x375a0d[_0x51683b('0x8')];_0x264818++){const _0x1677db=_0x1957b7[_0x375a0d[_0x264818]]['filter'](function(_0x2aee61){const _0x39ca3b=_0x51683b;return _0x2aee61[_0x39ca3b('0x10')]==='IPv4'&&_0x2aee61['internal']===![];});_0x1d8070=_0x1d8070['concat'](_0x1677db);}return _0x1d8070;}function getFirstInterface(){const _0x41ad75=_0x1d54a8,_0x4b7f76=_[_0x41ad75('0xf')](getInterfaces());return{'macAddress':_0x4b7f76&&_0x4b7f76[_0x41ad75('0x17')]?_0x4b7f76[_0x41ad75('0x17')]:_0x41ad75('0x6'),'ipAddress':_0x4b7f76&&_0x4b7f76[_0x41ad75('0x7')]?_0x4b7f76['address']:_0x41ad75('0xd')};}function getCPUhash(){const _0x18e320=_0x1d54a8,_0x1e456c=_[_0x18e320('0xe')](os['cpus']()[_0x18e320('0x18')](function(_0x187749){return _0x187749['model'];}))[_0x18e320('0x9')](':');return crypto[_0x18e320('0xc')](_0x18e320('0x1a'))[_0x18e320('0x1')](_0x1e456c)[_0x18e320('0x19')]('hex');}function getUuid(){const _0x3f3f41=_0x1d54a8,_0x43853e=getConfigService(),_0x1d5a2e=os[_0x3f3f41('0x1d')](),_0x164e5d=/[0-9a-f-]{36}/;if(!_0x43853e['isProduction']&&_0x164e5d[_0x3f3f41('0x1c')](_0x43853e[_0x3f3f41('0x2')]))return _0x43853e[_0x3f3f41('0x2')];else{if(_0x1d5a2e===_0x3f3f41('0x16'))return exec('dmidecode\x20--string\x20system-uuid',{'encoding':'utf8'})[_0x3f3f41('0x11')]('\x0d\x0a','');else{const _0x2816ed=getFirstInterface(),_0x3f1cab=getCPUhash(),_0x2e7df0=_0x3f1cab+'|'+os['hostname']()+'|'+_0x2816ed[_0x3f3f41('0x12')]+'|'+_0x2816ed[_0x3f3f41('0x14')],_0x52b8d7=crypto['createHash'](_0x3f3f41('0x1a'))[_0x3f3f41('0x1')](_0x2e7df0)[_0x3f3f41('0x19')](_0x3f3f41('0x5'));return _0x52b8d7[_0x3f3f41('0x13')](0x0,0x8)+'-'+_0x52b8d7[_0x3f3f41('0x13')](0x8,0xc)+'-'+_0x52b8d7[_0x3f3f41('0x13')](0xc,0x10)+'-'+_0x52b8d7[_0x3f3f41('0x13')](0x10,0x14)+'-'+_0x52b8d7[_0x3f3f41('0x13')](0x14);}}}module[_0x1d54a8('0xb')]={'getUuid':getUuid,'getFirstInterface':getFirstInterface,'getCPUhash':getCPUhash};