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
36043 views
1
module Msf::Util::EXE::OSX::Aarch64
2
include Msf::Util::EXE::Common
3
include Msf::Util::EXE::OSX::Common
4
5
def self.included(base)
6
base.extend(ClassMethods)
7
end
8
9
module ClassMethods
10
11
# Create an AARCH64 OSX Mach-O containing the payload provided in +code+
12
# to_osx_aarch64_macho
13
#
14
# @param framework [Msf::Framework] The framework of you want to use
15
# @param code [String]
16
# @param opts [Hash]
17
# @option [String] :template
18
# @return [String]
19
def to_osx_aarch64_macho(framework, code, opts = {})
20
mo = to_executable_with_template("template_aarch64_darwin.bin", framework, code, opts)
21
Msf::Payload::MachO.new(mo).sign
22
mo
23
end
24
end
25
26
class << self
27
include ClassMethods
28
end
29
end
30
31