Skip to content

Instantly share code, notes, and snippets.

View yellinben's full-sized avatar

Ben Yellin yellinben

View GitHub Profile
@hym3242
hym3242 / StandardKeyBinding.dict.dump.with.notes.txt
Last active April 20, 2025 15:35
Dump of /System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict on macOS Ventura 13.4, plus some notes
$ # plz forgive this dumb method of visualization.
$ cp /System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict .
$ plutil -convert xml1 StandardKeyBinding.dict
$ plutil -p StandardKeyBinding.dict | unicode-vis | cat -v | tr '\t' '+'
{
"^C" => "insertNewline:"
"^H" => "deleteBackward:"
"^Y" => "insertBacktab:" //shift+tab
"^[" => "cancelOperation:"
"^?" => "deleteBackward:"
@0xdevalias
0xdevalias / _deobfuscating-unminifying-obfuscated-web-app-code.md
Last active June 13, 2025 00:00
Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code
@mattmc3
mattmc3 / split.zsh.md
Last active May 15, 2025 09:44
ZSH - split string into array

There are a ton of different ways to split up a string in Zsh. This gist attempts to show them with examples to help you build your own. I write Zsh scripts all the time, and still reference back to this gist, so there you go.

From the Zsh docs on Parameter Expansion Flags (yeah - I know... how would anyone ever find that if they didn't know where to look!?)

j:string: Join the words of arrays together using string as a separator.
s:string: Force field splitting at the separator string.

You can also read more by running man zshexpn. (Again, I know, right!? How would anyone know to look there!?)

@tomhicks
tomhicks / plink-plonk.js
Last active May 15, 2025 13:25
Listen to your web pages

Reverse Engineering Tweaks

This lesson is target at reverse engineering iOS tweaks that have been written in Logos, and using the MobileSubstrate framework. Logos also has an "internal" generator configuration, and we will not be exploring that output today, however you should be able to figure out the differences yourself after completing this lesson.

Logos to Objective-C

Most modern tweaks are written in Logos. To understand the code we'll be looking at from reversed tweaks, we need to understand what a normal "hook" looks like in native code.

This is the example logos we'll be working with:

@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active June 11, 2025 23:01
Hyperlinks in Terminal Emulators
@thomasfinch
thomasfinch / buildFishiOS.sh
Created March 23, 2017 06:20
Bash script to build the fish shell for a jailbroken iOS device
#!/bin/bash
# Before running this script:
# Find AC_CHECK_FILES([/proc/self/stat]) in configure.ac and comment it out
# cd into the fish source directory
FLAGS="-stdlib=libc++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -target armv7-apple-darwin16 -miphoneos-version-min=8.0.0"
PREFIX=$(pwd)"/deb"
# Build fish
@steventroughtonsmith
steventroughtonsmith / main.m
Created March 24, 2016 08:08
Load Mach-O executable at runtime and execute its entry point
void callEntryPointOfImage(char *path, int argc, char **argv)
{
void *handle;
int (*binary_main)(int binary_argc, char **binary_argv);
char *error;
int err = 0;
printf("Loading %s…\n", path);
handle = dlopen (path, RTLD_LAZY);

#Loading Tweaks in the Simulator

With the latest updates to the simulator, this turns out to be pretty simple:

You need to be using kirb/theos

In order not to require MobileSubstrate to be loaded and your tweak to be compiled for i386/x86_64, add

In your makefile:

#!/usr/bin/env python
# Linux usage: ./extract_tampermonkey_script.py "/home/<USER>/.config/<BROWSER>/Default/Local Extension Settings/<EXTENSION_ID>"
# i.e.: ./extract_tampermonkey_script.py "/home/foo/.config/google-chrome-beta/Default/Local Extension Settings/gcalenpjmijncebpfijmoaglllgpjagf"
# Mac usage: ./extract_tampermonkey_script.py "/Users/<USER>/Library/Application Support/Google/Chrome/Default/Local Extension Settings/<EXTENSION_ID>/"
# i.e.: ./extract_tampermonkey_script.py "/Users/foo/Library/Application Support/Google/Chrome/Default/Local Extension Settings/dhdgffkkebhmkfjojejmpbldmpobfkfo/"
import leveldb
import sys
import re