From 088a85f6f25be9cc282a8d8295634ff8bbe22389 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Sat, 18 Mar 2023 21:21:46 -0400 Subject: 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 Signed-off-by: dusoleil --- sploit/builder/payload.py | 3 +++ 1 file changed, 3 insertions(+) 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)) -- cgit v1.2.3