kutils.h 598 B

123456789101112131415161718192021
  1. #ifndef kutils_h
  2. #define kutils_h
  3. #include <mach/mach.h>
  4. #include "IOKit.h"
  5. uint64_t task_self_addr(void);
  6. uint64_t ipc_space_kernel(void);
  7. uint64_t find_kernel_base(void);
  8. uint64_t current_thread(void);
  9. mach_port_t fake_host_priv(void);
  10. size_t kread_electra(uint64_t where, void *p, size_t size);
  11. size_t kwrite_electra(uint64_t where, const void *p, size_t size);
  12. uint64_t kalloc(vm_size_t size);
  13. uint64_t kexecute(mach_port_t user_client, uint64_t fake_client, uint64_t addr, uint64_t x0, uint64_t x1, uint64_t x2, uint64_t x3, uint64_t x4, uint64_t x5, uint64_t x6);
  14. #endif /* kutils_h */