Path: blob/master/lib/msf/util/exe/osx/ppc.rb
36043 views
module Msf::Util::EXE::OSX::Ppc1include Msf::Util::EXE::Common2include Msf::Util::EXE::OSX::Common34def self.included(base)5base.extend(ClassMethods)6end78module ClassMethods9# Create a PPC OSX Mach-O containing the payload provided in +code+10# to_osx_ppc_macho11#12# @param framework [Msf::Framework] The framework of you want to use13# @param code [String]14# @param opts [Hash]15# @option [String] :template16# @return [String]17def to_osx_ppc_macho(framework, code, opts = {})1819# Allow the user to specify their own template20set_template_default(opts, "template_ppc_darwin.bin")2122mo = get_file_contents(opts[:template])23bo = find_payload_tag(mo, "Invalid OSX PPC Mach-O template: missing \"PAYLOAD:\" tag")24mo[bo, code.length] = code25mo26end27end2829class << self30include ClassMethods31end32end333435