diff options
author | Malfurious <m@lfurio.us> | 2023-03-18 21:21:46 -0400 |
---|---|---|
committer | dusoleil <howcansocksbereal@gmail.com> | 2023-03-19 04:19:22 -0400 |
commit | 088a85f6f25be9cc282a8d8295634ff8bbe22389 (patch) | |
tree | 816ea30828073e965bb86a8482e990126d8e1806 | |
parent | 1ccdadce015abd4f57371168d2b3922716e9980d (diff) | |
download | sploit-088a85f6f25be9cc282a8d8295634ff8bbe22389.tar.gz sploit-088a85f6f25be9cc282a8d8295634ff8bbe22389.zip |
payload: Add method end()
To determine the address of the end of a payload, based on its Symtbl
data. I believe it makes the most sense to make this a part of the
Payload API, since Symtbl lacks a concept of element size.
Signed-off-by: Malfurious <m@lfurio.us>
Signed-off-by: dusoleil <howcansocksbereal@gmail.com>
-rw-r--r-- | sploit/builder/payload.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sploit/builder/payload.py b/sploit/builder/payload.py index cef17e0..cf105c6 100644 --- a/sploit/builder/payload.py +++ b/sploit/builder/payload.py @@ -36,6 +36,9 @@ class Payload: self.payload = value + self.payload return self + def end(self): + return self.sym.base + len(self) + def bin(self, *values, sym=None): return self._append(b''.join(values), sym=self._name('bin', sym)) |