Parent

Class/Module Index [+]

Quicksearch

Rex::ElfScan::Scanner::Generic

Attributes

elf[RW]
regex[RW]

Public Class Methods

new(elf) click to toggle source
# File lib/rex/elfscan/scanner.rb, line 11
def initialize(elf)
        self.elf = elf
end

Public Instance Methods

config(param) click to toggle source
# File lib/rex/elfscan/scanner.rb, line 15
def config(param)
end
scan(param) click to toggle source
# File lib/rex/elfscan/scanner.rb, line 18
def scan(param)
        config(param)

        $stdout.puts "[#{param['file']}]"
        elf.program_header.each do |program_header|

                # Scan only loadable segment entries in the program header table
                if program_header.p_type == Rex::ElfParsey::ElfBase::PT_LOAD
                        hits = scan_segment(program_header, param)
                        hits.each do |hit|
                                rva  = hit[0]
                                message  = hit[1].is_a?(Array) ? hit[1].join(" ") : hit[1]
                                $stdout.puts elf.ptr_s(rva) + " " + message
                        end
                end

        end
end
scan_segment(program_header, param={}) click to toggle source
# File lib/rex/elfscan/scanner.rb, line 37
def scan_segment(program_header, param={})
        []
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.