Last active
April 7, 2025 05:30
-
-
Save wh1te4ever/c7909dcb5b66c13a217b49ea3e320caf to your computer and use it in GitHub Desktop.
TrollStore Detector
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.m | |
// JBDetectTest | |
// | |
// Created by seo on 3/27/25. | |
// | |
#import "ViewController.h" | |
#import <dlfcn.h> | |
int SBSLaunchApplicationWithIdentifierAndURLAndLaunchOptions(NSString *bundleIdentifier, NSURL *url, NSDictionary *appOptions, NSDictionary *launchOptions, BOOL suspended) { | |
void *sbs_lib = dlopen("/System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices", RTLD_NOW); | |
void *sbs_addr = dlsym(sbs_lib, "SBSLaunchApplicationWithIdentifierAndURLAndLaunchOptions"); | |
typedef int (*sb_func_t)(NSString *, NSURL *, NSDictionary *, NSDictionary *, BOOL); | |
sb_func_t func = (sb_func_t) sbs_addr; | |
return func(bundleIdentifier, url, appOptions, launchOptions, suspended); | |
} | |
@interface ViewController () | |
@end | |
@implementation ViewController | |
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
// Do any additional setup after loading the view. | |
int r = SBSLaunchApplicationWithIdentifierAndURLAndLaunchOptions(@"com.opa334.TrollStore", nil, nil, nil, false); | |
bool isExist = r == 9 ? true : false; | |
NSLog(@"Is TrollStore Exist? %d\n", isExist); | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment