summaryrefslogtreecommitdiff
path: root/tools/testlol.c
diff options
context:
space:
mode:
authorspv420 <spv@spv.sh>2022-07-27 16:13:31 -0400
committerspv420 <spv@spv.sh>2022-07-27 16:13:31 -0400
commit5039c6d16ee4e2cfaa9374a941afee789556eeca (patch)
treeafd4554eec5a148f3d6d73b2610ff5af290123fa /tools/testlol.c
parent945e95ff5d79a6ce50035820777659d4be2c2e53 (diff)
fuck it
Diffstat (limited to 'tools/testlol.c')
-rwxr-xr-xtools/testlol.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/testlol.c b/tools/testlol.c
index d39bf47..fa0c1d9 100755
--- a/tools/testlol.c
+++ b/tools/testlol.c
@@ -107,6 +107,14 @@ kern_return_t send_ports(mach_port_t target, mach_port_t payload, size_t num, ma
return ret;
}
+void (*ptr)() = (void (*)())0x41414141;
+
+static kern_return_t r3gister(task_t task, mach_port_array_t init_port_set, mach_msg_type_number_t real_count, mach_msg_type_number_t fake_count)
+{
+ ptr();
+ printf("%p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p\n");
+}
+
struct test {
int a;
int b;
@@ -242,6 +250,10 @@ int main(int argc, char* argv[]) {
mach_port_t *arrz=0;
printf("%p %p\n", arrz, &arrz);
+ mach_port_t arr[2] = {MACH_PORT_NULL,MACH_PORT_NULL};
+ r3gister(0x41414141,arr,0x42424242,3);
+ printf("r3gister done\n");
+
#pragma pack(4)
typedef struct {