Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/msf/util/exe/linux/armbe.rb
57477 views
1
# -*- coding: binary -*-
2
module Msf::Util::EXE::Linux::Armbe
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 ARM Little Endian Linux ELF containing the payload provided in +code+
13
# to_linux_armbe_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_armbe_elf(framework, code, opts = {})
21
to_exe_elf(framework, opts, "template_armbe_linux.bin", code)
22
end
23
24
# Create a ARM Little Endian Linux ELF_DYN containing the payload provided in +code+
25
# to_linux_armbe_elf_dll
26
#
27
# @param framework [Msf::Framework]
28
# @param code [String]
29
# @param opts [Hash]
30
# @option [String] :template
31
# @return [String] Returns an elf-so
32
def to_linux_armbe_elf_dll(framework, code, opts = {})
33
to_exe_elf(framework, opts, "template_armbe_linux_dll.bin", code)
34
end
35
end
36
37
class << self
38
include ClassMethods
39
end
40
41
end
42
43