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