From 50d6b4eb1125628ccfdc899509786f6ae27ebbff Mon Sep 17 00:00:00 2001 From: Rob Date: Sat, 19 Feb 2022 14:23:16 -0500 Subject: [PATCH] added lstat hook to address a few apps --- Tweak.x | 10 ++++++++++ control | 2 +- include/cfuncs.h | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Tweak.x b/Tweak.x index 39ba135..cb37e34 100644 --- a/Tweak.x +++ b/Tweak.x @@ -113,6 +113,16 @@ static NSString *nsNotificationString = @"com.kc57.ihideprefs/settingschanged"; return %orig; } +%hookf(int, lstat, const char *restrict path, struct stat *restrict buf) { + if(isKnownBadPath(path)) + { + NSLog(@"[iHide] hooking lstat path: %s", path); + return -1; + } + // Call the original implementation of this function + return %orig; +} + %hookf(DIR *, opendir, const char *dirname) { if (isKnownBadPath(dirname)) { diff --git a/control b/control index 203f821..1c3a55d 100644 --- a/control +++ b/control @@ -1,6 +1,6 @@ Package: com.kc57.ihide Name: iHide -Version: 1.0.3 +Version: 1.0.4 Architecture: iphoneos-arm Description: Utility for hiding jailbreak from applications Maintainer: Rob Simon (@_Kc57) diff --git a/include/cfuncs.h b/include/cfuncs.h index 3c8089d..2326edb 100644 --- a/include/cfuncs.h +++ b/include/cfuncs.h @@ -7,6 +7,7 @@ #include int stat(const char *restrict path, struct stat *restrict buf); +int lstat(const char *restrict path, struct stat *restrict buf); DIR * opendir(const char *dirname); int posix_spawn(pid_t *restrict pid, const char *restrict path, const posix_spawn_file_actions_t *file_actions,