├── theos ├── .gitmodules ├── README.md ├── control ├── Makefile └── Tweak.xm /theos: -------------------------------------------------------------------------------- 1 | /opt/theos -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "theos"] 2 | path = theos 3 | url = https://github.com/DHowett/theos.git 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | letmedebug 2 | ========== 3 | 4 | * Disables ptrace's PT_DENY_ATTACH 5 | * Patches ptrace system call 6 | -------------------------------------------------------------------------------- /control: -------------------------------------------------------------------------------- 1 | Package: com.yourcompany.anadisfucker 2 | Name: ANadisFucker 3 | Depends: mobilesubstrate 4 | Version: 0.0.1 5 | Architecture: iphoneos-arm 6 | Description: An awesome MobileSubstrate tweak! 7 | Maintainer: Jack 8 | Author: Jack 9 | Section: Tweaks 10 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | ARCHS = armv7 armv7s arm64 2 | include theos/makefiles/common.mk 3 | 4 | TWEAK_NAME = letmedebug 5 | letmedebug_FILES = Tweak.xm 6 | letmedebug_FRAMEWORKS = UIKit 7 | 8 | include $(THEOS_MAKE_PATH)/tweak.mk 9 | 10 | after-install:: 11 | install.exec "killall -9 SpringBoard" 12 | -------------------------------------------------------------------------------- /Tweak.xm: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #if !defined(PT_DENY_ATTACH) 4 | #define PT_DENY_ATTACH 31 5 | #endif 6 | 7 | #if !defined(sys_ptrace_request) 8 | #define sys_ptrace_request 26 9 | #endif 10 | 11 | static int (*_ptraceHook)(int request, pid_t pid, caddr_t addr, int data); 12 | static int (*_syscall)(long request, long pid, long addr, long data); 13 | 14 | static int $ptraceHook(int request, pid_t pid, caddr_t addr, int data) { 15 | if (request == PT_DENY_ATTACH) { 16 | request = -1; 17 | } 18 | return _ptraceHook(request,pid,addr,data); 19 | } 20 | 21 | static int $syscall(long request, long pid, long addr, long data) { 22 | if (request == sys_ptrace_request) { 23 | return 0; 24 | } 25 | return _syscall(request,pid,addr,data); 26 | } 27 | 28 | %ctor { 29 | MSHookFunction((void *)MSFindSymbol(NULL,"_ptrace"), (void *)$ptraceHook, (void **)&_ptraceHook); 30 | MSHookFunction((void *)MSFindSymbol(NULL,"_syscall"),(void *)$syscall,(void **)&_syscall); 31 | } 32 | --------------------------------------------------------------------------------