Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/msf/util/exe/linux/riscv32le.rb
36043 views
1
module Msf::Util::EXE::Linux::Riscv32le
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
# Create a RISC-V 32-bit LE Linux ELF containing the payload provided in +code+
11
# to_linux_riscv32le_elf
12
#
13
# @param framework [Msf::Framework]
14
# @param code [String]
15
# @param opts [Hash]
16
# @option [String] :template
17
# @return [String] Returns an elf
18
def to_linux_riscv32le_elf(framework, code, opts = {})
19
to_exe_elf(framework, opts, "template_riscv32le_linux.bin", code)
20
end
21
22
# Create a RISC-V 32-bit LE Linux ELF_DYN containing the payload provided in +code+
23
# to_linux_riscv32le_elf_dll
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_riscv32le_elf_dll(framework, code, opts = {})
31
to_exe_elf(framework, opts, "template_riscv32le_linux_dll.bin", code)
32
end
33
end
34
35
class << self
36
include ClassMethods
37
end
38
39
end
40
41