Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/msf/util/exe/osx/aarch64.rb
57477 views
1
# -*- coding: binary -*-
2
module Msf::Util::EXE::OSX::Aarch64
3
include Msf::Util::EXE::Common
4
include Msf::Util::EXE::OSX::Common
5
6
def self.included(base)
7
base.extend(ClassMethods)
8
end
9
10
module ClassMethods
11
12
# Create an AARCH64 OSX Mach-O containing the payload provided in +code+
13
# to_osx_aarch64_macho
14
#
15
# @param framework [Msf::Framework] The framework of you want to use
16
# @param code [String]
17
# @param opts [Hash]
18
# @option [String] :template
19
# @return [String]
20
def to_osx_aarch64_macho(framework, code, opts = {})
21
mo = to_executable_with_template("template_aarch64_darwin.bin", framework, code, opts)
22
Msf::Payload::MachO.new(mo).sign
23
mo
24
end
25
end
26
27
class << self
28
include ClassMethods
29
end
30
end
31
32