【问题标题】:Correct offset of specific section PE特定截面 PE 的正确偏移
【发布时间】:2013-11-18 16:40:25
【问题描述】:

我想知道我的计算是否正确。 我知道以下几点:

AddressOfEntryPoint(of PE)
ImageBase(Of PE)
VirtualAddress of section i want

所以这个部分的偏移量(在文件中)是offset = ImageBase - VirtualAddress

这是正确的吗?如果不是,请解释我如何计算该部分的偏移量。

【问题讨论】:

  • 那里不应该有PointerToRawData吗?查看规格。
  • 我得到了 RawDataSize,但没有指向原始数据的指针。

标签: portable-executable


【解决方案1】:

你可以使用pefile模块。here

for section in pe.sections:
  print section.PointerToRawData

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-12-26
    • 1970-01-01
    • 1970-01-01
    • 2013-08-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多