summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordusoleil <howcansocksbereal@gmail.com>2023-03-13 09:44:44 -0400
committerdusoleil <howcansocksbereal@gmail.com>2023-03-13 18:28:53 -0400
commit1b4e81c5753bb551d9a81e174d851c98d63e0124 (patch)
treead1c6de78b8d35c1eba381551315cbf0df9e4010
parent0b7f6eba62c93c53c0adc9eda6c8fffb507b8fdd (diff)
downloadsploit-1b4e81c5753bb551d9a81e174d851c98d63e0124.tar.gz
sploit-1b4e81c5753bb551d9a81e174d851c98d63e0124.zip
payload: Add explicit width ints
Signed-off-by: dusoleil <howcansocksbereal@gmail.com> Reviewed-by: Malfurious <m@lfurio.us>
-rw-r--r--sploit/payload.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/sploit/payload.py b/sploit/payload.py
index 1ece105..cef17e0 100644
--- a/sploit/payload.py
+++ b/sploit/payload.py
@@ -47,6 +47,22 @@ class Payload:
values = [ itob(v) for v in values ]
return self.bin(*values, sym=self._name('int', sym))
+ def int8(self, *values, sym=None):
+ values = [ itob(v, 1) for v in values ]
+ return self.bin(*values, sym=self._name('int', sym))
+
+ def int16(self, *values, sym=None):
+ values = [ itob(v, 2) for v in values ]
+ return self.bin(*values, sym=self._name('int', sym))
+
+ def int32(self, *values, sym=None):
+ values = [ itob(v, 4) for v in values ]
+ return self.bin(*values, sym=self._name('int', sym))
+
+ def int64(self, *values, sym=None):
+ values = [ itob(v, 8) for v in values ]
+ return self.bin(*values, sym=self._name('int', sym))
+
def ret(self, *values, sym=None):
return self.int(*values, sym=self._name('ret', sym))