Created
September 1, 2015 03:09
-
-
Save adammw/41997c4a4c16b91b73a1 to your computer and use it in GitHub Desktop.
clang -framework Foundation -o lockscreen lockscreen.m
This file contains hidden or 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
#import <objc/runtime.h> | |
#import <Foundation/Foundation.h> | |
int main () { | |
NSBundle *bundle = [NSBundle bundleWithPath:@"/Applications/Utilities/Keychain Access.app/Contents/Resources/Keychain.menu"]; | |
Class principalClass = [bundle principalClass]; | |
id instance = [[principalClass alloc] init]; | |
[instance performSelector:@selector(_lockScreenMenuHit:) withObject:nil]; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment