Created
March 2, 2017 15:27
-
-
Save deepredsky/d3f9b8fc57100181c8fdedc22667c2e9 to your computer and use it in GitHub Desktop.
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; | |
} | |
// Compile the source file | |
// clang -framework Foundation main.m -o lockscreen |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment