Skip to content

Instantly share code, notes, and snippets.

View RamseyK's full-sized avatar

Ramsey Kant RamseyK

View GitHub Profile
### Keybase proof
I hereby claim:
* I am ramseyk on github.
* I am ramseyk (https://keybase.io/ramseyk) on keybase.
* I have a public key ASCTmAL7-IClzz9Sh3KC1ddk2Ah-x1dQoE12fgZqmSCU2Ao
To claim this, I am signing this object:
@RamseyK
RamseyK / dyld_image_list.c
Last active December 25, 2020 12:44
Example code for retrieving loaded libraries using functions in dyld.h
#include <mach-o/dyld.h>
char *target_image_name = "libdyld";
const struct mach_header* target_mach_header = NULL;
const char *image_name = NULL;
int num_images = _dyld_image_count();
printf("%i images loaded\n", num_images);
for (int i = 0; i < num_images; i++) {
@RamseyK
RamseyK / plistp.sh
Last active October 20, 2018 22:59
plistp - Simple shell wrapper for PlistBuddy to print plists
#!/bin/sh
if [[ ! $1 ]] || [[ ! -f $1 ]]; then
echo "Provide a valid file"
exit
fi
/usr/libexec/PlistBuddy -x -c "Print" $1