diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2012-06-01 05:26:34 +0000 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2012-06-01 05:28:22 +0000 |
commit | 43318ffe18750983058829ee0224d7328a5252a8 (patch) | |
tree | 202c8f5955a5f098d46b252b37a77a47bef0391d | |
parent | a4ccf03b126d08d4135f6c7d619e4ff25f7abb41 (diff) |
Use SBSOpenSensitiveURLAndUnlock (comex, chpwn).
-rw-r--r-- | makefile | 6 | ||||
-rw-r--r-- | uiopen.mm | 18 | ||||
-rw-r--r-- | uiopen.xml | 7 |
3 files changed, 23 insertions, 8 deletions
@@ -17,15 +17,15 @@ uishoot := -framework CoreFoundation -framework Foundation -framework UIKit %: %.mm $${PKG_TARG}-g++ -Wall -Werror -o $@ $< $($@) -F"$${PKG_ROOT}"/System/Library/PrivateFrameworks -lobjc - ldid -S $@ + ldid -S$(wildcard $@.xml) $@ %: %.c $${PKG_TARG}-gcc -Wall -Werror -o $@ $< -framework CoreFoundation - ldid -S $@ + ldid -S$(wildcard $@.xml) $@ iomfsetgamma: iomfsetgamma.c $${PKG_TARG}-gcc -Wall -Werror -o $@ $< -F"$${PKG_ROOT}"/System/Library/PrivateFrameworks -framework IOKit -framework IOMobileFramebuffer - ldid -S $@ + ldid -S$(wildcard $@.xml) $@ package: all rm -rf _ @@ -39,15 +39,23 @@ #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; } diff --git a/uiopen.xml b/uiopen.xml new file mode 100644 index 0000000..5fa1d07 --- /dev/null +++ b/uiopen.xml @@ -0,0 +1,7 @@ +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>com.apple.springboard.opensensitiveurl</key> + <true/> +</dict> +</plist> |