Open cq674350529 opened 2 months ago
pwntools on my ubuntu machine cannot load plt in your file. Radare validates that
unlink.plt is at 0x00041b60
> uv pip list| grep pwn
pwntools 4.13.0
> python
>>> from pwn import *
>>> exe = ELF('./init', checksec=False)
[!] Could not populate PLT: No module named 'pkg_resources'
>>> hex(exe.sym.unlink)
'0x41b60'
Thanks, exe.sym.unlink
or exe.symbols["unlink"]
works well, I may use this instead.
Description
When tried to get the plt information from
init
elf withpwntools
, it outputed the wrong address for some functions.Take the
unlink
function as an example, the outputed plt address is0x42138
. However, it's0x41B60
shown in IDA Pro.I tested it on the following environment:
The binary information are as follows, and added as an attachment below.
init.zip