Skip to content

Instantly share code, notes, and snippets.

View miticollo's full-sized avatar
🏠
Working from home

Lorenzo miticollo

🏠
Working from home
View GitHub Profile
@miticollo
miticollo / posix_spawn.ts
Created August 27, 2023 21:29
posix_spawn for Frida
const LIBSYSTEM_KERNEL_PATH: string = '/usr/lib/system/libsystem_kernel.dylib';
// https://github.com/apple-oss-distributions/xnu/blob/aca3beaa3dfbd42498b42c5e5ce20a938e6554e5/libsyscall/wrappers/spawn/posix_spawn.c#L2820-L2945
const posix_spawn = new NativeFunction(
Module.getExportByName(LIBSYSTEM_KERNEL_PATH, 'posix_spawn'),
'int',
['pointer', 'pointer', 'pointer', 'pointer', 'pointer', 'pointer'],
);
// https://github.com/apple-oss-distributions/xnu/blob/aca3beaa3dfbd42498b42c5e5ce20a938e6554e5/libsyscall/wrappers/spawn/posix_spawn.c#L1415-L1455
const posix_spawn_file_actions_init = new NativeFunction(
@miticollo
miticollo / Makefile
Last active December 31, 2023 09:24 — forked from khanhduytran0/ProcursusTSHelper.c
ProcursusTSHelper.c
IOS_MINVER = 15.0
IOS_CC := $(shell xcrun --sdk iphoneos -f clang)
IOS_CFLAGS := -Wall -Wextra -pipe -Oz -isysroot $(shell xcrun --sdk iphoneos --show-sdk-path) -miphoneos-version-min=$(IOS_MINVER)
IOS_LDFLAGS := -dynamiclib -install_name "@rpath/"$@
TARGET = libTS2JailbreakEnv.dylib
.PHONY: sign clean
sign: $(TARGET)
@ldid -S $^
@miticollo
miticollo / futurerestore.sh
Last active February 26, 2024 06:05
In a new macOS terminal run `bash ./futurerestore.sh <path/to/SHSH> <path/to/ipsw> -c` and follow instructions
#!/usr/bin/env bash
#
# Perform iOS and iPadOS downgrade using gaster and futurerestore.
set -e
BOLD=$(tput bold)
readonly BOLD
NC=$(tput sgr0)
readonly NC