mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-24 02:59:49 +02:00
testing 123
This commit is contained in:
1 parent
d65a570726
commit
269b3dc81f
2 files changed
+4
-3
No files matched your search
+3
-2
@@ -12,6 +12,7 @@
|
||||
|
||||
#include "phookra1n.h"
|
||||
|
||||
extern char **environ;
|
||||
extern char ***_NSGetArgv(void);
|
||||
extern int *_NSGetArgc(void);
|
||||
|
||||
@@ -26,7 +27,7 @@ __attribute__((constructor)) void ctor(void)
|
||||
int argc = *argcp;
|
||||
char **argv = *argvp;
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
#if TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR
|
||||
if (argc == 2 && strcmp(argv[1], "__CHECKRA1N_JIT_PLEASE__") == 0) {
|
||||
assert(ptrace(PT_TRACE_ME, 0, 0, 0) == 0);
|
||||
exit(0);
|
||||
@@ -35,7 +36,7 @@ __attribute__((constructor)) void ctor(void)
|
||||
uint32_t exe_path_size = PATH_MAX;
|
||||
assert(_NSGetExecutablePath(exe_path, &exe_path_size) == 0);
|
||||
pid_t pid;
|
||||
assert(posix_spawnp(&pid, exe_path, NULL, NULL, (char*[]){"__CHECKRA1N_JIT_PLEASE__",NULL}, NULL) == 0);
|
||||
assert(posix_spawnp(&pid, exe_path, NULL, NULL, (char*[]){"__CHECKRA1N_JIT_PLEASE__",NULL}, environ) == 0);
|
||||
assert(waitpid(pid, NULL, 0) == pid);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define dprintf(...) // printf(__VA_ARGS__)
|
||||
#define dprintf(...) printf(__VA_ARGS__)
|
||||
|
||||
extern uint8_t t7000_bin[];
|
||||
extern uint32_t t7000_bin_len;
|
||||
|
||||
Reference in new issue
Block a user