From 5039c6d16ee4e2cfaa9374a941afee789556eeca Mon Sep 17 00:00:00 2001 From: spv420 Date: Wed, 27 Jul 2022 16:13:31 -0400 Subject: fuck it --- tools/testlol.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tools') 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 { -- cgit v1.2.3