Skip to content

Commit

Permalink
Use DTrace and LLDB to attach to the UIKit host process and patch out…
Browse files Browse the repository at this point in the history
… check
  • Loading branch information
zhuowei committed Jun 5, 2018
1 parent e56dc10 commit fc3d2d9
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Expand Up @@ -5,3 +5,9 @@ Not ready.
- Other Linker Flags: -fuse-ld=$(PROJECT_DIR)/ldwrap
- Code Signing: anything is fine (I use Don't Code Sign)
- build for Simulator (iPhone SE is fine)

In another terminal

```
sudo ./uikitenabler.sh
```
5 changes: 5 additions & 0 deletions tracescript.d
@@ -0,0 +1,5 @@
proc:::start /execname == "UIKitHostApp"/ {
printf("New UIKit window!\n");
raise(SIGSTOP);
system("lldb -p %d -s uikitenabler.lldb", pid);
}
8 changes: 8 additions & 0 deletions uikitenabler.lldb
@@ -0,0 +1,8 @@
breakpoint set -r "@objc UIKitHostApp.UHAService.authenticateConnection"
breakpoint command add
thread return 1
process detach
script import ctypes
script ctypes.CDLL("libSystem.dylib").exit(0)
DONE
c
2 changes: 2 additions & 0 deletions uikitenabler.sh
@@ -0,0 +1,2 @@
#!/bin/sh
exec dtrace -w -s tracescript.d

0 comments on commit fc3d2d9

Please sign in to comment.