Sha256: 5643a52d5082a17dbb7a06c88cde460e8a91c39ee3845eb2dfd88e8694dd4425
Contents?: true
Size: 780 Bytes
Versions: 40
Compression:
Stored size: 780 Bytes
Contents
#!/usr/bin/env ruby # $Id: search.rb 10173 2010-08-27 21:26:59Z jduck $ module Rex module ElfScan module Search class DumpRVA attr_accessor :elf def initialize(elf) self.elf = elf end def config(param) @address = param['args'] end def scan(param) config(param) $stdout.puts "[#{param['file']}]" # Adjust based on -A and -B flags pre = param['before'] || 0 suf = param['after'] || 16 @address -= pre @address = 0 if (@address < 0 || ! @address) buf = elf.read_rva(@address, suf) $stdout.puts elf.ptr_s(@address) + " " + buf.unpack("H*")[0] end end class DumpOffset < DumpRVA def config(param) begin @address = elf.offset_to_rva(param['args']) rescue Rex::ElfParsey::BoundsError end end end end end end
Version data entries
40 entries across 40 versions & 1 rubygems