2021-11-19 05:17:47 +03:00
|
|
|
var fs = require('fs');
|
2020-07-22 22:18:34 +03:00
|
|
|
|
|
|
|
var agents = {
|
2022-07-02 01:01:25 +03:00
|
|
|
'MeshService.exe': 3,
|
|
|
|
'MeshService64.exe': 4,
|
2020-07-22 22:18:34 +03:00
|
|
|
'meshagent_x86': 5,
|
|
|
|
'meshagent_x86-64': 6,
|
|
|
|
'meshagent_arm': 9,
|
|
|
|
'meshagent_mips': 7,
|
|
|
|
'meshagent_pogo': 13,
|
|
|
|
'meshagent_poky': 15,
|
|
|
|
'meshagent_osx-x86-64': 16,
|
|
|
|
'meshagent_poky64': 18,
|
|
|
|
'meshagent_x86_nokvm': 19,
|
2021-01-20 11:26:53 +03:00
|
|
|
'meshagent_x86-64_nokvm': 20,
|
2020-07-22 22:18:34 +03:00
|
|
|
'meshagent_arm-linaro': 24,
|
|
|
|
'meshagent_armhf': 25,
|
|
|
|
'meshagent_arm64': 26,
|
2020-09-29 23:26:45 +03:00
|
|
|
'meshagent_armhf2': 27,
|
2020-09-11 00:26:10 +03:00
|
|
|
'meshagent_mips24kc': 28,
|
2020-12-08 07:42:25 +03:00
|
|
|
'meshagent_osx-arm-64': 29,
|
|
|
|
'meshagent_freebsd_x86-64': 30,
|
2021-01-19 23:51:10 +03:00
|
|
|
'meshagent_aarch64': 32,
|
2021-01-29 04:23:38 +03:00
|
|
|
'meshagent_alpine-x86-64': 33,
|
2021-01-08 01:28:10 +03:00
|
|
|
'meshagent_mipsel24kc': 40,
|
2021-01-19 23:51:10 +03:00
|
|
|
'meshagent_aarch64-cortex-a53': 41,
|
2020-12-08 07:42:25 +03:00
|
|
|
'meshagent_osx-universal-64': 10005
|
2020-07-22 22:18:34 +03:00
|
|
|
}
|
|
|
|
|
2021-11-19 05:43:27 +03:00
|
|
|
var agentinfo = {};
|
2021-11-19 05:17:47 +03:00
|
|
|
for (var i in agents) {
|
|
|
|
var info = getAgentInfo(i, agents[i]);
|
2021-11-19 05:43:27 +03:00
|
|
|
if (info != null) { agentinfo[agents[i]] = info; }
|
2021-11-19 05:17:47 +03:00
|
|
|
}
|
|
|
|
console.log(JSON.stringify(agentinfo, null, 2));
|
2020-07-22 22:18:34 +03:00
|
|
|
process.exit();
|
|
|
|
|
2021-11-19 05:17:47 +03:00
|
|
|
function getAgentInfo(filename, id) {
|
|
|
|
if (fs.existsSync(filename) != true) return null;
|
|
|
|
var stats = fs.statSync(filename);
|
2021-11-19 05:43:27 +03:00
|
|
|
return { filename: filename, hash: getSHA384FileHash(filename).toString('hex'), size: stats.size, mtime: stats.mtime };
|
2020-09-11 00:26:10 +03:00
|
|
|
}
|