$ # 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:" |
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!?)
/* | |
Copy this into the console of any web page that is interactive and doesn't | |
do hard reloads. You will hear your DOM changes as different pitches of | |
audio. | |
I have found this interesting for debugging, but also fun to hear web pages | |
render like UIs do in movies. | |
*/ | |
const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
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.
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:
[ Update 2025-03-24: Commenting is disabled permanently. Previous comments are archived at web.archive.org. ]
Most of the terminal emulators auto-detect when a URL appears onscreen and allow to conveniently open them (e.g. via Ctrl+click or Cmd+click, or the right click menu).
It was, however, not possible until now for arbitrary text to point to URLs, just as on webpages.
#!/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 |
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 |