Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/msf/util/exe/linux/aarch64.rb
36043 views
1
module Msf::Util::EXE::Linux::Aarch64
2
include Msf::Util::EXE::Common
3
include Msf::Util::EXE::Linux::Common
4
5
def self.included(base)
6
base.extend(ClassMethods)
7
end
8
9
module ClassMethods
10
11
# Create a AARCH64 64-bit LE Linux ELF containing the payload provided in +code+
12
# to_linux_aarch64_elf
13
#
14
# @param framework [Msf::Framework]
15
# @param code [String]
16
# @param opts [Hash]
17
# @option [String] :template
18
# @return [String] Returns an elf
19
def to_linux_aarch64_elf(framework, code, opts = {})
20
to_exe_elf(framework, opts, "template_aarch64_linux.bin", code)
21
end
22
23
# Create a AARCH64 Linux ELF_DYN containing the payload provided in +code+
24
#
25
# @param framework [Msf::Framework]
26
# @param code [String]
27
# @param opts [Hash]
28
# @option [String] :template
29
# @return [String] Returns an elf
30
def to_linux_aarch64_elf_dll(framework, code, opts = {})
31
to_exe_elf(framework, opts, "template_aarch64_linux_dll.bin", code)
32
end
33
end
34
35
class << self
36
include ClassMethods
37
end
38
39
end
40
41