Skip to content

Instantly share code, notes, and snippets.

@Juszczak Juszczak/
Created Mar 22, 2018

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"];
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.