From 26429b42ace55d2dc4eecba7a5a648cc49811941 Mon Sep 17 00:00:00 2001 From: Pwn20wnd Date: Sun, 10 Feb 2019 20:43:19 +0300 Subject: Use the updated patchfinder64 from submodule --- .gitmodules | 3 +++ Makefile | 5 +++-- main.m | 4 ++-- patchfinder64 | 1 + 4 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .gitmodules create mode 160000 patchfinder64 diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..8cafbbc --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "patchfinder64"] + path = patchfinder64 + url = git@github.com:sbingner/patchfinder64.git diff --git a/Makefile b/Makefile index c0b693e..a66032e 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,13 @@ ARCHS ?= arm64 target ?= iphone:latest:11.0 -CFLAGS = -Iinclude +CFLAGS = -Iinclude -Wno-error=unused-variable -Wno-error=unused-function include $(THEOS)/makefiles/common.mk TOOL_NAME = inject inject_CODESIGN_FLAGS = -Sentitlements.xml +inject_CFLAGS += -I./patchfinder64 -Wno-unused-variable -Wno-unused-function inject_LIBRARIES = mis inject_FRAMEWORKS = IOKit Security -inject_FILES = main.m inject.m patchfinder64.c kern_funcs.c +inject_FILES = main.m inject.m patchfinder64/patchfinder64.c kern_funcs.c include $(THEOS_MAKE_PATH)/tool.mk diff --git a/main.m b/main.m index 17b7e00..de107ff 100644 --- a/main.m +++ b/main.m @@ -9,7 +9,7 @@ #include #include #include -#include "patchfinder64.h" +#include "patchfinder64/patchfinder64.h" #include "CSCommon.h" #include "kern_funcs.h" #include "inject.h" @@ -46,7 +46,7 @@ int main(int argc, char* argv[]) { (kernel_base = dyld_info.all_image_info_addr) == 0) { return -3; } - init_kernel(kernel_base, NULL); + init_kernel(kread, kernel_base, NULL); uint64_t trust_chain = find_trustcache(); term_kernel(); printf("Injecting to trust cache...\n"); diff --git a/patchfinder64 b/patchfinder64 new file mode 160000 index 0000000..2c10f54 --- /dev/null +++ b/patchfinder64 @@ -0,0 +1 @@ +Subproject commit 2c10f54e7658c4a09dbc79f2d9600a62a2427011 -- cgit v1.2.3