diff options
-rw-r--r-- | tools/sploit/sploit/mem.py | 2 | ||||
-rw-r--r-- | tools/sploit/sploit/payload.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/sploit/sploit/mem.py b/tools/sploit/sploit/mem.py index 9ae0575..3a3e697 100644 --- a/tools/sploit/sploit/mem.py +++ b/tools/sploit/sploit/mem.py @@ -36,7 +36,7 @@ class Symtbl: self.sym[k] = v + off def rebase(self, off): - self.adjust(-off) + self.adjust(self.base - off) def __str__(_self): FMT = '\n{:<20} {:<20}' diff --git a/tools/sploit/sploit/payload.py b/tools/sploit/sploit/payload.py index 9fab65e..a7721e0 100644 --- a/tools/sploit/sploit/payload.py +++ b/tools/sploit/sploit/payload.py @@ -28,13 +28,13 @@ class Payload(Symtbl): return f'{kind}_{ctr}' def __append(self, value, sym): - setattr(self, sym, len(self)) + setattr(self, sym, self.base + len(self)) self._namesp.payload += value return self def __prepend(self, value, sym): self.adjust(len(value)) - setattr(self, sym, 0) + setattr(self, sym, self.base) self._namesp.payload = value + self._namesp.payload return self |