Archived
Initial commit
This commit is contained in:
1 parent
a2f8a287f0
commit
fe8ae46c34
4 files changed
+85
No files matched your search
@@ -0,0 +1,11 @@
|
||||
TWEAK_NAME = pwngress
|
||||
pwngress_FILES = Tweak.xm
|
||||
|
||||
export TARGET = iphone:clang
|
||||
export ARCHS = armv7 arm64
|
||||
export TARGET_IPHONEOS_DEPLOYMENT_VERSION = 6.0
|
||||
export ADDITIONAL_OBJCFLAGS = -fobjc-arc -fvisibility=hidden
|
||||
export INSTALL_TARGET_PROCESSES = Ingress
|
||||
|
||||
include $(THEOS)/makefiles/common.mk
|
||||
include $(THEOS_MAKE_PATH)/tweak.mk
|
||||
@@ -0,0 +1,64 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <substrate.h>
|
||||
|
||||
static NSArray *NotAllowedPathPrefixes;
|
||||
|
||||
static BOOL allowAccess(NSString *filename) {
|
||||
if ([filename hasPrefix:@"/private"]) {
|
||||
filename = [filename substringFromIndex:@"/private".length];
|
||||
}
|
||||
if (filename.length == 0) {
|
||||
return YES;
|
||||
}
|
||||
for (NSString *prefix in NotAllowedPathPrefixes) {
|
||||
if ([filename hasPrefix:prefix]) {
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
||||
%group pwnDetection
|
||||
int stat (const char *filename, struct stat *result);
|
||||
%hookf(int *, stat, const char *filename, struct stat *result) {
|
||||
if (!allowAccess([NSString stringWithUTF8String:filename])) {
|
||||
filename = "";
|
||||
}
|
||||
return %orig;
|
||||
}
|
||||
|
||||
int lstat (const char *filename, struct stat *result);
|
||||
%hookf(int *, lstat, const char *filename, struct stat *result) {
|
||||
if (!allowAccess([NSString stringWithUTF8String:filename])) {
|
||||
filename = "";
|
||||
}
|
||||
return %orig;
|
||||
}
|
||||
|
||||
FILE *fopen(const char *filename, const char *mode);
|
||||
%hookf(FILE **, fopen, const char *filename, const char *mode) {
|
||||
if (!allowAccess([NSString stringWithUTF8String:filename])) {
|
||||
filename = "";
|
||||
}
|
||||
return %orig;
|
||||
}
|
||||
%end
|
||||
|
||||
%ctor {
|
||||
@autoreleasepool {
|
||||
NotAllowedPathPrefixes = @[
|
||||
@"/bin",
|
||||
@"/usr/bin",
|
||||
@"/usr/sbin",
|
||||
@"/usr/libexec",
|
||||
@"/etc/passwd",
|
||||
@"/etc/ssh",
|
||||
@"/var/log",
|
||||
@"/var/tmp",
|
||||
@"/Applications",
|
||||
@"/Library/MobileSubstrate",
|
||||
@"/System/Library/LaunchDaemons"
|
||||
];
|
||||
%init(pwnDetection);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
Package: com.synecx.pwngress
|
||||
Name: pwngress
|
||||
Version: 1.0
|
||||
Architecture: iphoneos-arm
|
||||
Depends: mobilesubstrate
|
||||
Description: Bypass Ingress jailbreak detection
|
||||
Maintainer: Erwin <synecx@live.com>
|
||||
Author: Erwin <synecx@live.com>
|
||||
Section: Tweaks
|
||||
@@ -0,0 +1 @@
|
||||
{ Filter = { Bundles = ( "com.google.ingress" ); }; }
|
||||
Reference in new issue
Block a user