Skip to content

Commit 7983f87

Browse files
committed
Land #16597, psh cmd adapter fix for encrypt shell
2 parents 98b2234 + adcf45b commit 7983f87

34 files changed

+83
-58
lines changed

lib/msf/core/payload.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ def initialize(info = {})
5959
#
6060
self.module_info['Dependencies'] = self.module_info['Dependencies'] || []
6161

62-
# If this is a staged payload but there is no stage information,
62+
# If this is an adapted or staged payload but there is no stage information,
6363
# then this is actually a stager + single combination. Set up the
6464
# information hash accordingly.
65-
if self.class.include?(Msf::Payload::Single) and
65+
if (self.class.include?(Msf::Payload::Adapter) || self.class.include?(Msf::Payload::Single)) and
6666
self.class.include?(Msf::Payload::Stager)
6767
self.module_info['Stage'] = {}
6868

@@ -288,7 +288,7 @@ def session
288288
#
289289
# Generates the payload and returns the raw buffer to the caller.
290290
#
291-
def generate
291+
def generate(_opts = {})
292292
internal_generate
293293
end
294294

lib/msf/core/payload/generic.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def reset
4343
# the actual payload in case settings have changed. Other methods will
4444
# use the cached version if possible.
4545
#
46-
def generate
46+
def generate(_opts = {})
4747
reset
4848

4949
redirect_to_actual(:generate)

lib/msf/core/payload/linux/bind_tcp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module Payload::Linux::BindTcp
1919
#
2020
# Generate the first stage
2121
#
22-
def generate
22+
def generate(_opts = {})
2323
conf = {
2424
port: datastore['LPORT'],
2525
reliable: false

lib/msf/core/payload/linux/reverse_tcp_x86.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module Payload::Linux::ReverseTcp_x86
1818
#
1919
# Generate the first stage
2020
#
21-
def generate
21+
def generate(_opts = {})
2222
conf = {
2323
port: datastore['LPORT'],
2424
host: datastore['LHOST'],

lib/msf/core/payload/linux/x64/reverse_tcp_x64.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module Payload::Linux::ReverseTcp_x64
1717
#
1818
# Generate the first stage
1919
#
20-
def generate
20+
def generate(_opts = {})
2121
conf = {
2222
port: datastore['LPORT'],
2323
host: datastore['LHOST'],

lib/msf/core/payload/php/bind_tcp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module Payload::Php::BindTcp
1717
#
1818
# Generate the first stage
1919
#
20-
def generate
20+
def generate(_opts = {})
2121
conf = {
2222
port: datastore['LPORT']
2323
}

lib/msf/core/payload/php/reverse_tcp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module Payload::Php::ReverseTcp
1717
#
1818
# Generate the first stage
1919
#
20-
def generate
20+
def generate(_opts = {})
2121
conf = {
2222
port: datastore['LPORT'],
2323
host: datastore['LHOST'],

lib/msf/core/payload/python/bind_tcp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module Payload::Python::BindTcp
1616
#
1717
# Generate the first stage
1818
#
19-
def generate
19+
def generate(_opts = {})
2020
conf = {
2121
port: datastore['LPORT']
2222
}

lib/msf/core/payload/python/reverse_tcp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def initialize(*args)
2121
#
2222
# Generate the first stage
2323
#
24-
def generate
24+
def generate(_opts = {})
2525
conf = {
2626
port: datastore['LPORT'],
2727
host: datastore['LHOST'],

lib/msf/core/payload/python/reverse_tcp_ssl.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def initialize(*args)
2020
#
2121
# Generate the first stage
2222
#
23-
def generate
23+
def generate(_opts = {})
2424
conf = {
2525
port: datastore['LPORT'],
2626
host: datastore['LHOST'],

0 commit comments

Comments
 (0)