Path: blob/master/modules/payloads/singles/bsd/x86/exec.rb
21547 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::Bsd1819def initialize(info = {})20super(21merge_info(22info,23'Name' => 'BSD Execute Command',24'Description' => 'Execute an arbitrary command',25'Author' => [26'snagg <snagg[at]openssl.it>',27'argp <argp[at]census-labs.com>',28'joev'29],30'License' => BSD_LICENSE,31'Platform' => 'bsd',32'Arch' => ARCH_X8633)34)3536# Register exec options37register_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