Skip to content

Instantly share code, notes, and snippets.

View uroboro's full-sized avatar
🐍
Working

uroboro uroboro

🐍
Working
View GitHub Profile
➤ python json_output.py -d xxx -t T1000 -o - file1.swift file2.swift
{"file1.swift": {"object": "xxx/file1.swift.T1000.o", "dependencies": "xxx/file1.swift.T1000.Td"}, "file2.swift": {"object": "xxx/file2.swift.T1000.o", "dependencies": "xxx/file2.swift.T1000.Td"}, "": {"swift-dependencies": "xxx/master.swiftdeps"}}⏎
@uroboro
uroboro / Apple8723Container.c
Last active December 28, 2023 18:23
iPod Nano 6g jailbreak?
// Todo
@uroboro
uroboro / Theos_dependencies_GCS.md
Last active November 18, 2018 00:32
Package-command table for Google Cloud Shell
Package Commands
pre-installed touch lzma
bash bash
coreutils cat chmod cp du ln md5sum mkdir nproc tr rm uname
git git
grep grep
make make
openssh-client scp
perl perl
@uroboro
uroboro / classTreeGraphviz.mm
Last active October 31, 2018 21:40
Generate a Graphviz diagram from an Objective-C class inheritance tree. Copy to tree.gv and run `dot -Tpng tree.png tree.gv`
int numberOfClasses = objc_getClassList(NULL, 0);
Class * classList = (Class *)malloc(numberOfClasses * sizeof(Class));
numberOfClasses = objc_getClassList(classList, numberOfClasses);
NSString * string = @"digraph cluster {\nrankdir=\"LR\"\n";
for (int idx = 0; idx < numberOfClasses; idx++) {
Class clazz = classList[idx];
if (some expression to filter results) {
NSString * str = [NSString stringWithFormat:@"%@ -> %@\n",
@uroboro
uroboro / stringSwitch.m
Last active November 20, 2022 02:27
Objective-C switch statement with strings.
#include <stdio.h>
#import <Foundation/Foundation.h>
int main(int argc, char **argv) {
NSArray * options = @[
@"-h",
@"--help",
@"--get",
@"--set",
];
@uroboro
uroboro / f2a54fb4d440903a6e070c0f1894e090.md
Last active May 8, 2020 11:12
Logos alternative generators
@uroboro
uroboro / x.md
Last active March 4, 2018 22:19
%hookf(FILE *, "fopen", const char *path, const char *mode) {
	NSLog(@"Hey, we're hooking fopen to deny relative paths!");
	if (path[0] != '/') {
		return NULL;
	}
	return %orig; // Call the original implementation of this function
}
/*
 * cbz Rn, location
 *
 * 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16   <-- bit
 *  0  0  1  1  0  1  0  0 [                         <-- meaning
 * 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0   <-- bit
 *                         location][           Rn]  <-- meaning
 * location is 4 byte aligned
 *
@uroboro
uroboro / find_offsets.sh
Last active March 10, 2024 03:30
v0rtex offset finder script
#!//bin/sh
export PATH=bin:$PATH
self=$0
function print_help() {
echo "$self [IPSW path]"
echo "$self [device model] [ios build]"
echo
@uroboro
uroboro / OFFSET_IOSURFACEROOTUSERCLIENT_VTAB explanation.md
Created December 9, 2017 18:31
OFFSET_IOSURFACEROOTUSERCLIENT_VTAB explanation.md

Explanation for OFFSET_IOSURFACEROOTUSERCLIENT_VTAB

  1. extract the IOSurface kext
  2. hex -dump the entire __DATA_CONST.__const segment
  3. you should see a lot of pointers, occasionally separated by some zeroes - you're looking at vtable contents, e.g.:

now subclasses of IOUserClient have huge vtables, a couple hundred pointers