Open k4lizen opened 4 months ago
Along with this, a process.maps()
(which would returned a parsed /proc/<pid>/maps
) could be implemented, and .libc/libs/stack/heap/whatever would just use that.
Also returning the size along with the address would be useful.
I would be willing to work on this PR if the feature is approved.
Sure, this sounds useful! Next to the hardcoded properties, having a shortcut to receive the base address of any mapping without having to filter the .libs() result manually would be great too.
The same way there is a way to get the address of shared libraries: process.libs(), which is currently implemented by inspecting
/proc/<pid>/maps
as linked in the docs, it should be possible to find the base address of the binary, stack and heap, even when ASLR is on.This would be quite handy in some cases (like easily calculating offsets locally, which can then be used on remote processes).