#import <UIKit/UIKit.h>
#include <stdio.h>
+#include <dlfcn.h>
int main(int argc, char *argv[]) {
- if (argc != 2)
+ if (argc != 2) {
fprintf(stderr, "usage: %s <url>\n", argv[0]);
- else {
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- [[UIApplication alloc] openURL:[NSURL URLWithString:[NSString stringWithUTF8String:argv[1]]]];
- [pool release];
+ return 1;
}
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ NSURL *url([NSURL URLWithString:[NSString stringWithUTF8String:argv[1]]]);
+
+ if (void (*SBSOpenSensitiveURLAndUnlock)(NSURL *, BOOL) = (void (*)(NSURL *, BOOL)) dlsym(RTLD_DEFAULT, "SBSOpenSensitiveURLAndUnlock"))
+ (*SBSOpenSensitiveURLAndUnlock)(url, YES);
+ else
+ [[UIApplication alloc] openURL:url];
+
+ [pool release];
return 0;
}