Advertisement
ichitaso

tfp0.c

Jun 28th, 2022
733
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None
  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
RAW Paste Data Copied
Advertisement