Skip to content

Instantly share code, notes, and snippets.

/*
* SEP firmware split tool
*
* Copyright (c) 2017 xerub
*/
#include <fcntl.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
version
s8000 restore ramdisk key
rootfs key
kernelcache.n71 key
9.0_13A342
b45fb3bc5efac96ad4dbf79abb95222f7f9447cb34b1a62e86218d560604d80c5219e66d6d9b4d48109a1d469c76dd78
a21bf3a46558256c3ee1c6a40e50964f2b31a442ebc3848ff82bca3c0db68305e68bc926
fc7f4c6bf4f73f26b27a9b87782de0052d529c618d89cb887697666b0942ce5d95e1e2f8c6eb2e396dae9b8827fa1125
9.0.1_13A405
/*
* Copyright (c) 2015, 2016 xerub
*/
#ifdef __LP64__
#define KDELTA 0x4000 /* XXX 7.x-8.x: 0x2000 */
#else
#define KDELTA 0x1000
#endif
@xerub
xerub / otaa2.c
Last active July 15, 2022 00:18
#define _BSD_SOURCE
#include <arpa/inet.h>
#include <stdint.h>
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/stat.h> // for mkdir
@xerub
xerub / pbzx2.c
Last active July 15, 2022 00:18
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <lzma.h>
int main(int argc, const char * argv[])
{
@xerub
xerub / prologue.py
Last active July 15, 2022 00:18
AArch64 prologue
# Fix clang function prologues
# WARNING: this WILL patch bytes in the database
#
# Copyright (c) 2015 xerub
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
@xerub
xerub / Simp.py
Last active July 15, 2022 00:18
AArch64 mov simplifier IDA plugin
# AArch64 mov simplifier IDA plugin
#
# Copyright (c) 2015 xerub
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@xerub
xerub / libpatch.c
Last active July 15, 2022 00:18
partition hacks
/*
* partition hacks
*
* Copyright (c) 2015 xerub
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
@xerub
xerub / ultrasn0w.c
Created June 8, 2015 22:49
blow, blow, ultrasn0w
/* ultrasn0w (D) xerub 2014
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the "do What The Fuck you want to Public License";
* either version 1 of the License, or whatever (the fuck) version you want.
*
* $ ios-clang -o ultrasn0w.o -Wno-variadic-macros -O2 -c ultrasn0w.c
* $ ios-clang -o ultrasn0w.dylib -shared ultrasn0w.o -lsubstrate -lATCommandStudioDynamic
*
* Inject into CommCenterClassic iPhone3,1 baseband 1.59.00
@xerub
xerub / sshtool.c
Last active July 15, 2022 00:18
a simple ssh wrapper used to perform various tasks via FISH protocol
/*
* sshtool
*
* Copyright (c) 2015 xerub
* Copyright (c) 1998 Pavel Machek
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.