From cd213c29c5982db7d054fb1abe76f54dd6a82196 Mon Sep 17 00:00:00 2001 From: Joshua Drake Date: Fri, 7 May 2010 21:45:21 +0000 Subject: [PATCH] change offset_to_rva into file_offset_to_va, add comments git-svn-id: file:///home/svn/framework3/trunk@9242 4d416f70-5f16-0410-b530-b9f4589650da --- lib/rex/peparsey/pe.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/rex/peparsey/pe.rb b/lib/rex/peparsey/pe.rb index 5f9b056b56..a083e12a4c 100644 --- a/lib/rex/peparsey/pe.rb +++ b/lib/rex/peparsey/pe.rb @@ -184,10 +184,16 @@ class Pe < PeBase (ptr_32?) ? ("0x%.8x" % va) : ("0x%.16x" % va) end - def offset_to_rva(offset) - image_base + offset + # + # Converts a file offset into a virtual address + # + def file_offset_to_va(offset) + image_base + file_offset_to_rva(offset) end + # + # Read raw bytes from the specified offset in the underlying file + # def read(offset, len) _isource.read(offset, len) end