diff options
| author | Jakob <jakob@memeware.net> | 2017-09-01 16:40:01 -0400 |
|---|---|---|
| committer | Jakob <jakob@memeware.net> | 2017-09-01 16:40:01 -0400 |
| commit | 8b232076240dc7e6f8abdfca3d1634ae065c691b (patch) | |
| tree | a41f21c0d10eca31331801d5e1687e5c52224394 /hypodermic | |
| parent | 2a715b27d8a39eb1aa01bb771f97bba8dacde5af (diff) | |
Process.rtld now returns the base region of the RTLD.
Diffstat (limited to 'hypodermic')
| -rw-r--r-- | hypodermic/main.py | 6 | ||||
| -rw-r--r-- | hypodermic/process.py (renamed from hypodermic/ptrace.py) | 7 |
2 files changed, 5 insertions, 8 deletions
diff --git a/hypodermic/main.py b/hypodermic/main.py index 635e3a7..74c4486 100644 --- a/hypodermic/main.py +++ b/hypodermic/main.py @@ -21,7 +21,7 @@ import argparse import sys import textwrap -from hypodermic.ptrace import Process +from hypodermic.process import Process class CustomHelp(argparse.HelpFormatter): @@ -106,8 +106,8 @@ def main(): sys.exit(1) if args.create: - alert("Creating process at path {}".format(args.create)) + alert("Creating process at path '{}'...".format(args.create)) p = Process(path=args.create) else: - alert("Attaching to process with pid {}".format(args.attach)) + alert("Attaching to process with pid {}...".format(args.attach)) p = Process(pid=args.attach) diff --git a/hypodermic/ptrace.py b/hypodermic/process.py index 714b567..6fc1519 100644 --- a/hypodermic/ptrace.py +++ b/hypodermic/process.py @@ -112,12 +112,9 @@ class Process(object): """ return maps(self.pid) - # FIXME: This approach does not work outside of seeing if the - # process has an RTLD page. The reality is that the RTLD is - # broken up into independent several pages. @property def rtld(self) -> Region: - """Obtain the region of memory for the process' RTLD, if it + """Obtain the base region of memory for the process' RTLD, if it exists. Returns: @@ -125,5 +122,5 @@ class Process(object): RTLD was found. """ for region in self.maps: - if re.search(r"ld.+\.so", region.path): + if re.search(r"ld.+\.so", region.path) and region.off == 0: return region |