Path: blob/master/lib/msf/util/exe/osx/ppc.rb
57477 views
# -*- coding: binary -*-1module Msf::Util::EXE::OSX::Ppc2include Msf::Util::EXE::Common3include Msf::Util::EXE::OSX::Common45def self.included(base)6base.extend(ClassMethods)7end89module ClassMethods10# Create a PPC OSX Mach-O containing the payload provided in +code+11# to_osx_ppc_macho12#13# @param framework [Msf::Framework] The framework of you want to use14# @param code [String]15# @param opts [Hash]16# @option [String] :template17# @return [String]18def to_osx_ppc_macho(framework, code, opts = {})1920# Allow the user to specify their own template21set_template_default(opts, "template_ppc_darwin.bin")2223mo = get_file_contents(opts[:template])24bo = find_payload_tag(mo, "Invalid OSX PPC Mach-O template: missing \"PAYLOAD:\" tag")25mo[bo, code.length] = code26mo27end28end2930class << self31include ClassMethods32end33end343536