Skip to content

Instantly share code, notes, and snippets.

@Juszczak Juszczak/compile.sh
Created Mar 22, 2018

Embed
What would you like to do?
MacOS LockScreen Util
clang -framework Foundation lock.m -o lock
#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
You can’t perform that action at this time.