Built motion from commit 19a84241.|2.5.34
[motion2.git] / server / config / license / hardware.js
index 1c6206a..2000dfb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xff2a=['networkInterfaces','orderBy','keys','length','filter','family','IPv4','internal','concat','head','mac','address','127.0.0.1','getFirstInterface','map','model','createHash','md5','digest','getUuid','dmidecode\x20--string\x20system-uuid','replace','hostname','ipAddress','update','hex','substring','crypto','bimedia-machine-uuid','execSync'];(function(_0x5876d2,_0x176e16){var _0x1762e6=function(_0x4c950b){while(--_0x4c950b){_0x5876d2['push'](_0x5876d2['shift']());}};_0x1762e6(++_0x176e16);}(_0xff2a,0x93));var _0xaff2=function(_0x378487,_0x1fdc2c){_0x378487=_0x378487-0x0;var _0x3bb63b=_0xff2a[_0x378487];return _0x3bb63b;};'use strict';var _=require('lodash');var os=require('os');var crypto=require(_0xaff2('0x0'));var machine=require(_0xaff2('0x1'));var exec=require('child_process')[_0xaff2('0x2')];function getInterfaces(){var _0x25db80=[];var _0x5bb7dd=os[_0xaff2('0x3')]();var _0x5c7c1c=_[_0xaff2('0x4')](_[_0xaff2('0x5')](_0x5bb7dd));for(var _0x5a704c=0x0;_0x5a704c<_0x5c7c1c[_0xaff2('0x6')];_0x5a704c++){var _0x8313e5=_0x5bb7dd[_0x5c7c1c[_0x5a704c]][_0xaff2('0x7')](function(_0x3498b7){return _0x3498b7[_0xaff2('0x8')]===_0xaff2('0x9')&&_0x3498b7[_0xaff2('0xa')]===![];});_0x25db80=_0x25db80[_0xaff2('0xb')](_0x8313e5);}return _0x25db80;}function getFirstInterface(){var _0x289563=_[_0xaff2('0xc')](getInterfaces());return{'macAddress':_0x289563&&_0x289563['mac']?_0x289563[_0xaff2('0xd')]:'00:00:00:00:00:00','ipAddress':_0x289563&&_0x289563['address']?_0x289563[_0xaff2('0xe')]:_0xaff2('0xf')};}exports[_0xaff2('0x10')]=getFirstInterface;function getCPUhash(){var _0x26de0d=_[_0xaff2('0x4')](os['cpus']()[_0xaff2('0x11')](function(_0x175f2c){return _0x175f2c[_0xaff2('0x12')];}))['join'](':');return crypto[_0xaff2('0x13')](_0xaff2('0x14'))['update'](_0x26de0d)[_0xaff2('0x15')]('hex');}exports[_0xaff2('0x16')]=function(){switch(os['platform']()){case'win32':return exec(_0xaff2('0x17'),{'encoding':'utf8'})[_0xaff2('0x18')]('\x0d\x0a','');default:var _0x19029b=getFirstInterface();var _0x3d4d8c=getCPUhash();var _0x155e64=_0x3d4d8c+'|'+os[_0xaff2('0x19')]()+'|'+_0x19029b['macAddress']+'|'+_0x19029b[_0xaff2('0x1a')];var _0x439803=crypto[_0xaff2('0x13')](_0xaff2('0x14'))[_0xaff2('0x1b')](_0x155e64)[_0xaff2('0x15')](_0xaff2('0x1c'));return _0x439803['substring'](0x0,0x8)+'-'+_0x439803[_0xaff2('0x1d')](0x8,0xc)+'-'+_0x439803['substring'](0xc,0x10)+'-'+_0x439803[_0xaff2('0x1d')](0x10,0x14)+'-'+_0x439803['substring'](0x14);}};
\ No newline at end of file
+var _0xcef8=['concat','head','mac','00:00:00:00:00:00','getFirstInterface','cpus','map','model','join','createHash','md5','getUuid','platform','licenseToken','win32','dmidecode\x20--string\x20system-uuid','replace','hostname','macAddress','ipAddress','update','digest','hex','substring','crypto','child_process','../environment','networkInterfaces','orderBy','length','filter','IPv4','internal'];(function(_0x102493,_0x88cf50){var _0x58e76d=function(_0x519ea6){while(--_0x519ea6){_0x102493['push'](_0x102493['shift']());}};_0x58e76d(++_0x88cf50);}(_0xcef8,0x183));var _0x8cef=function(_0x5734e1,_0x3e1d75){_0x5734e1=_0x5734e1-0x0;var _0x22c784=_0xcef8[_0x5734e1];return _0x22c784;};'use strict';var _=require('lodash');var os=require('os');var crypto=require(_0x8cef('0x0'));var machine=require('bimedia-machine-uuid');var exec=require(_0x8cef('0x1'))['execSync'];var config=require(_0x8cef('0x2'));function getInterfaces(){var _0x48456b=[];var _0x5008ab=os[_0x8cef('0x3')]();var _0x436c04=_[_0x8cef('0x4')](_['keys'](_0x5008ab));for(var _0x4e3e90=0x0;_0x4e3e90<_0x436c04[_0x8cef('0x5')];_0x4e3e90++){var _0x2c7578=_0x5008ab[_0x436c04[_0x4e3e90]][_0x8cef('0x6')](function(_0x279f19){return _0x279f19['family']===_0x8cef('0x7')&&_0x279f19[_0x8cef('0x8')]===![];});_0x48456b=_0x48456b[_0x8cef('0x9')](_0x2c7578);}return _0x48456b;}function getFirstInterface(){var _0xb81437=_[_0x8cef('0xa')](getInterfaces());return{'macAddress':_0xb81437&&_0xb81437['mac']?_0xb81437[_0x8cef('0xb')]:_0x8cef('0xc'),'ipAddress':_0xb81437&&_0xb81437['address']?_0xb81437['address']:'127.0.0.1'};}exports[_0x8cef('0xd')]=getFirstInterface;function getCPUhash(){var _0x3b4217=_['orderBy'](os[_0x8cef('0xe')]()[_0x8cef('0xf')](function(_0x5c6596){return _0x5c6596[_0x8cef('0x10')];}))[_0x8cef('0x11')](':');return crypto[_0x8cef('0x12')](_0x8cef('0x13'))['update'](_0x3b4217)['digest']('hex');}exports[_0x8cef('0x14')]=function(){var _0x262c8f=os[_0x8cef('0x15')]();var _0x503dbd=/[0-9a-f-]{36}/;if(config[_0x8cef('0x16')]&&_0x503dbd['test'](config[_0x8cef('0x16')])){return config[_0x8cef('0x16')];}else if(_0x262c8f===_0x8cef('0x17')){return exec(_0x8cef('0x18'),{'encoding':'utf8'})[_0x8cef('0x19')]('\x0d\x0a','');}else{var _0x493dae=getFirstInterface();var _0x4d7d3b=getCPUhash();var _0xd936f2=_0x4d7d3b+'|'+os[_0x8cef('0x1a')]()+'|'+_0x493dae[_0x8cef('0x1b')]+'|'+_0x493dae[_0x8cef('0x1c')];var _0x5b2fcc=crypto[_0x8cef('0x12')]('md5')[_0x8cef('0x1d')](_0xd936f2)[_0x8cef('0x1e')](_0x8cef('0x1f'));return _0x5b2fcc['substring'](0x0,0x8)+'-'+_0x5b2fcc[_0x8cef('0x20')](0x8,0xc)+'-'+_0x5b2fcc[_0x8cef('0x20')](0xc,0x10)+'-'+_0x5b2fcc['substring'](0x10,0x14)+'-'+_0x5b2fcc[_0x8cef('0x20')](0x14);}};
\ No newline at end of file