如何使用 Perl 从 WinNT 可移植可执行文件中读取标头? [英] How can I read the headers from a WinNT portable executable file using Perl?
问题描述
我想在 Perl 中处理 PE 文件,但没有找到模块,所以我想我会自己编写(已经在 delphi 中做过一次).
I want to work with PE files in Perl and didn't find a module, so I think I will write my own (already did that in delphi once).
我只有一个问题,当将可执行文件映射到缓冲区时,我如何搜索 0x00004550 (IMAGE_NT_SIGNATURE) 之类的八进制,将它们转换回可写字符串等?
I only got one problem, when mapping the executable to a buffer, how can i search for octals like 0x00004550 (IMAGE_NT_SIGNATURE), convert them back to writeable strings etc?
推荐答案
有一个 Perl 模块来操作可移植的可执行文件:Win32::Exe
.
There is a Perl module to manipulate portable executables: Win32::Exe
.
我不知道您的确切问题,但如果您仍想编写自己的库,Win32::Exe
可能是一个很好的参考.
I don't have a clue on your exact question, but if you still want to write your own library, Win32::Exe
might be a good reference.
这篇关于如何使用 Perl 从 WinNT 可移植可执行文件中读取标头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!