mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-09 19:45:13 +02:00
20 lines
457 B
JavaScript
20 lines
457 B
JavaScript
// Phase 13 — CommonJS export, benign control.
|
|
|
|
'use strict';
|
|
const { execFileSync } = require('child_process');
|
|
|
|
function runPing(host) {
|
|
process.stdout.write('__NYX_SINK_HIT__\n');
|
|
try {
|
|
execFileSync('true', [host], {
|
|
encoding: 'utf8',
|
|
timeout: 5000,
|
|
stdio: ['ignore', 'pipe', 'ignore'],
|
|
});
|
|
return 'ok';
|
|
} catch (_e) {
|
|
return 'err';
|
|
}
|
|
}
|
|
|
|
module.exports = { runPing };
|