Advertisement
ichitaso

tfp0.c

Jun 28th, 2022
1,039
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. #include <mach/mach.h>
  2. #include <stdio.h>
  3.  
  4. int main(void) {
  5.     mach_port_t kernel_task = 0;
  6.     printf("task_for_pid: %d\n",host_get_special_port(mach_host_self(), HOST_LOCAL_NODE, 4, &kernel_task));
  7.     if (!host_get_special_port(mach_host_self(), HOST_LOCAL_NODE, 4, &kernel_task)) return -1;
  8.     return kernel_task;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement