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
57477 views
1
# -*- coding: binary -*-
2
module Msf::Util::EXE::Linux::Aarch64
3
include Msf::Util::EXE::Common
4
include Msf::Util::EXE::Linux::Common
5
6
def self.included(base)
7
base.extend(ClassMethods)
8
end
9
10
module ClassMethods
11
12
# Create a AARCH64 64-bit LE Linux ELF containing the payload provided in +code+
13
# to_linux_aarch64_elf
14
#
15
# @param framework [Msf::Framework]
16
# @param code [String]
17
# @param opts [Hash]
18
# @option [String] :template
19
# @return [String] Returns an elf
20
def to_linux_aarch64_elf(framework, code, opts = {})
21
to_exe_elf(framework, opts, "template_aarch64_linux.bin", code)
22
end
23
24
# Create a AARCH64 Linux ELF_DYN containing the payload provided in +code+
25
#
26
# @param framework [Msf::Framework]
27
# @param code [String]
28
# @param opts [Hash]
29
# @option [String] :template
30
# @return [String] Returns an elf
31
def to_linux_aarch64_elf_dll(framework, code, opts = {})
32
to_exe_elf(framework, opts, "template_aarch64_linux_dll.bin", code)
33
end
34
end
35
36
class << self
37
include ClassMethods
38
end
39
40
end
41
42