This file contains 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 <stdio.h> | |
#include <fcntl.h> | |
#include <stdlib.h> | |
#include <sys/ioctl.h> // for _IOW, a macro required by FSEVENTS_CLONE | |
#include <sys/types.h> // for uint32_t and friends, on which fsevents.h relies | |
#include <unistd.h> | |
#include <string.h> // memset | |
//#include <sys/_types.h> // for uint32_t and friends, on which fsevents.h relies | |
#include <sys/stat.h> // for mkdir |
This file contains 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
csrutil disable | |
sudo nvram boot-args="intcoproc_unrestricted=1 kext-dev-mode=1 amfi_allow_any_signature=1 amfi_unrestrict_task_for_pid=1 PE_i_can_has_debugger=1 cs_enforcement_disable=1 amfi_get_out_of_my_way=1 amfi=0xff cs_debug=1 ipc_control_port_options=0" | |
sudo spctl --global-disable | |
sudo defaults write /Library/Preferences/com.apple.security.coderequirements Entitlements -string always | |
sudo defaults write /Library/Preferences/com.apple.security.coderequirements AllowUnsafeDynamicLinking -bool YES | |
sudo defaults write /Library/Preferences/com.apple.security.libraryvalidation.plist DisableLibraryValidation -bool YES | |
defaults write com.apple.loginwindow DisableScreenLockImmediate -bool yes |
This file contains 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
// | |
// A simple arm64[e] launcher program that catches program crashes and spits out every thread's state and backtrace | |
// | |
// dbgspawn.c | |
// Created by Derek Selander on 9/27/23. | |
// Permissive License: do whatever, so long as you keep this header & note that I am not responsible for any damages | |
// | |
/* To build for iOS on macOS | |
This file contains 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
{ | |
"global": { | |
"check_for_updates_on_startup": true, | |
"show_in_menu_bar": true, | |
"show_profile_name_in_menu_bar": false | |
}, | |
"profiles": [ | |
{ | |
"complex_modifications": { | |
"parameters": { |
This file contains 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 <CoreFoundation/CoreFoundation.h> | |
#include <mach/mach.h> | |
#define plog(str,args...) printf("[%6d] "str"\n",getpid(), ##args) | |
#define HandleError(kr) if (kr != KERN_SUCCESS) {\ | |
printf("error: line %d in PID: %d, (%d) 0x%x, %s\n", __LINE__,\ | |
getpid(), kr, kr, mach_error_string(kr));\ | |
exit(1);} | |
struct favorite_animal_msg { |
This file contains 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 <stdlib.h> | |
#include <stdio.h> | |
#include <pthread/pthread.h> | |
#include <mach/mach.h> | |
struct ool_msg { | |
mach_msg_header_t hdr; | |
mach_msg_body_t body; | |
mach_msg_ool_ports_descriptor_t ool_ports[]; | |
}; |
This file contains 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
// | |
// main.m | |
// platform_swap @LOLgrep | |
// clang -o /tmp/platform_swap /path/to/platform_swap.m -framework Foundation | |
#import <Foundation/Foundation.h> | |
#import <mach-o/fat.h> | |
#import <mach-o/loader.h> | |
struct version { |
This file contains 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
// | |
// clang builtin_print_struct.c && ./a.out | |
// | |
// Created by Derek Selander | |
// dyld_all_image_infos header courtsey of dyld's opensource.apple.com | |
// | |
#include <mach/mach.h> | |
#include <mach/task_info.h> | |
#include <stdio.h> |
This file contains 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
xcrun -sdk iphoneos clang -fobjc-arc -arch arm64 -fmodules -g main.m |
This file contains 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
# Get llvm/clang/lldb shit to build in Xcode and not Ninja or VS Code | |
cmake -DLLVM_ENABLE_PROJECTS=clang ../llvm -G Xcode -DLLVM_INCLUDE_TESTS=FALSE -DLLVM_TARGETS_TO_BUILD="AArch64;X86" -DLLVM_ENABLE_IDE=TRUE |
NewerOlder