Files
2025-04-23 15:41:41 +02:00

17 lines
367 B
JavaScript

const cp = require('child_process'),
http = require('http'),
url = require('url');
function getShell() {
return "sh";
}
function execSh(command, options) {
return cp.spawn(getShell(), ["-c", command], options) // $ Alert
};
http.createServer(function (req, res) {
let cmd = url.parse(req.url, true).query.path; // $ Source
execSh(cmd);
});