Skip to content

Instantly share code, notes, and snippets.

@0xallie
0xallie / altermail.sh
Created March 15, 2023 23:11 — forked from avarayr/altermail.sh
Fix SideloadlyPlugin.mailbundle after MacOS updates
View altermail.sh
#!/bin/sh
# Check if running as root
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
token=`cat /System/Applications/Mail.app/Contents/Info.plist | grep -A1 "PluginCompatibilityUUID" | grep string | sed 's/<string>//' | sed 's/<\/string>//'`
path="/Library/Mail/Bundles/SideloadlyPlugin.mailbundle/Contents/Info.plist"
@0xallie
0xallie / apnoncer.m
Last active February 15, 2023 21:54
Get APNonce and generator on macOS / jailbroken iOS with root privileges (SIP can be enabled)
View apnoncer.m
//
// main.m
// apnoncer
//
// Created by alexia on 2023-02-15.
//
@import CoreFoundation;
@import Foundation;
#import <dlfcn.h>
View transprism.py
# prism.py: Copyright (c) 2010 Alex Barrett <al.barrett@gmail.com>
# transprism.py: Copyright (c) 2022 alexia <me@alexia.lol>
#
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this license document, and changing it is allowed as long
# as the name is changed.
#
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
#
View iBoot64Patcher.Dockerfile
FROM alpine AS base
ENV CONF_ARGS="--disable-shared" \
CMAKE_ARGS="-DBUILD_SHARED_LIBS=0" \
CC="clang" \
CFLAGS="-fPIC" \
CXX="clang++" \
CXXFLAGS="-fPIC" \
LD="ld.lld" \
LDFLAGS="-fuse-ld=/usr/bin/ld.lld -static -static-libgcc -Wl,--allow-multiple-definition -Wl,--no-dynamic-linker -Wl,-static"
RUN apk add --no-cache autoconf automake bash clang15 cmake coreutils gcc g++ git libtool lld m4 make musl musl-dev openssl-dev openssl-libs-static pkgconf && \
@0xallie
0xallie / decrypt.sh
Last active December 18, 2022 00:01
Decrypt app on a jailbroken iDevice
View decrypt.sh
#!/bin/bash
if [ "$#" -lt 1 ]; then
echo "ERROR: Missing argument." >&2
echo "Usage: $0 --list|<name>"
exit 1
fi
if [ "$#" -gt 1 ]; then
echo "ERROR: Too many arguments." >&2
View usbmuxd2.Dockerfile
FROM debian:buster AS base
ENV CONF_ARGS="--disable-shared" \
CMAKE_ARGS="-DBUILD_SHARED_LIBS=0" \
CC="clang" \
CXX="clang++" \
LD="ld.lld" \
CFLAGS="-fPIC" \
CXXFLAGS="-fPIC" \
LDFLAGS="-Wl,--allow-multiple-definition"
RUN apt-get -y update && \
@0xallie
0xallie / exit_vs_sys_exit.txt
Last active September 30, 2022 18:00
exit() vs sys.exit()
View exit_vs_sys_exit.txt
❯ python
Python 3.10.7 (main, Sep 7 2022, 12:19:18) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> try:
... exit()
... except SystemExit:
... print("no exit for you")
... finally:
... print("cleanup")
...
View strip_cc.py
from __future__ import annotations
import argparse
import os
import subprocess
from pathlib import Path
def strip_cc(file: Path | os.PathLike[str]) -> None:
"""
@0xallie
0xallie / dsnp_chapters.py
Last active August 3, 2022 16:20
Code to get chapters from Disney+ (for BAMSDK v7.3.0)
View dsnp_chapters.py
def get_chapters(self, title):
milestones = []
for type_, type_milestones in title.service_data.get("milestone").items():
for milestone in type_milestones:
milestones.append((type_, milestone))
if not milestones:
return []
types = {
# https://github.com/IMFTool/IMFTool/blob/master/src/ImfCommon.cpp#L458-L504
@0xallie
0xallie / a11dfu.sh
Last active January 12, 2023 03:32
Helper script to enter DFU mode from recovery on A11+ devices
View a11dfu.sh
#!/bin/sh -e
step() {
for i in $(seq "$1" -1 1); do
printf '\r\e[1;36m%s (%d) ' "$2" "$i"
sleep 1
done
printf '\r\e[0m%s (0)\n' "$2"
}