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
#include <objc/runtime.h> | |
#include <Foundation/Foundation.h> | |
#include <IOKit/IOKitLib.h> | |
#include <spawn.h> | |
#include <unistd.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <err.h> | |
#include <sys/wait.h> | |
#include <sys/stat.h> |
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
#!/bin/bash | |
# Run the lsregister command and store the output in a variable | |
output=$(/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump) | |
# Use awk to parse the relevant sections | |
echo "$output" | awk ' | |
# When "CFBundleDisplayName" is found, store the app name | |
/CFBundleDisplayName/ { | |
app_name = substr($0, index($0, "=") + 2) |
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
// | |
// pplrw.m | |
// kfd | |
// | |
// Created by Lars Fröder on 29.12.23. | |
// | |
#import <Foundation/Foundation.h> | |
#import <dlfcn.h> | |
#import <mach-o/dyld.h> |