Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
if (( EUID != 0 )); then
echo "ERROR: This script must be run as root." >&2
exit 1
fi
files=(
/var/MobileAsset/Assets/com_apple_MobileAsset_SoftwareUpdate
/var/MobileAsset/Assets/com_apple_MobileAsset_SoftwareUpdateDocumentation
@0xallie
0xallie / latestwv.sh
Created October 17, 2020 13:25
Get latest Widevine ChromeCDM version
#!/bin/bash
tmpdir=$(mktemp -d)
curl https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | dpkg-deb -x - "$tmpdir"
strings "$tmpdir/opt/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so" | grep '^4\.10'
rm -rf "$tmpdir"
#!/bin/bash
echo 'Updating /etc/wsl.conf...'
printf '[network]\ngenerateResolvConf=false\' | sudo tee -a /etc/wsl.conf > /dev/null
echo 'Updating /etc/resolv.conf...'
printf 'nameserver 8.8.8.8' | sudo tee /etc/resolv.conf > /dev/null
echo 'DNS settings updated. Press Enter to terminate WSL. Any unsaved work will be lost!'
read -r < /dev/tty
wsl.exe --shutdown
@0xallie
0xallie / sideload.sh
Created December 18, 2020 19:17
Sideload IPA on jailbroken iOS device (like AppSync Unified, the installed apps will only work when the device is in jailbroken state)
#!/bin/bash
if (( EUID != 0 )); then
printf 'This script must be run as root.\n' >&2
exit 1
fi
if [[ $1 != *.ipa ]]; then
printf 'Usage: %s file.ipa\n' "$0" >&2
exit 1
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google_auth.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
setsupervision() {
perl -0pi -e "s/IsSupervised([\s\S]*?)(true|false)/IsSupervised\$1$1/" /var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles/Library/ConfigurationProfiles/CloudCon
figurationDetails.plist && killall -9 profiled && killall -9 Preferences 2>/dev/null
}
alias supervise='echo -n "Supervising device... "; setsupervision true; echo "done"'
alias unsupervise='echo -n "Unsupervising device... "; setsupervision false; echo "done"'
#!/bin/bash -e
echo '[+] Installing dependencies from apt'
sudo apt-get -y update
sudo apt-get -y install --no-install-recommends autoconf autogen automake g++ gcc git libc6-dev libcurl4-openssl-dev libreadline-dev libssl-dev libtool libudev-dev libzip-dev m4 make pkg-config python3-dev zlib1g-dev
tmpdir=$(mktemp -d)
pushd "$tmpdir" &>/dev/null
for lib in libusb/libusb libimobiledevice/libirecovery libimobiledevice/libplist tihmstar/libgeneral tihmstar/libfragmentzip DanTheMann15/tsschecker; do
@0xallie
0xallie / pallas.sh
Last active April 7, 2021 14:58 — forked from Siguza/pallas.sh
newstyle OTA
#!/bin/zsh
set -e;
incr=false;
if [ "$1" = '-i' ]; then
incr=true;
shift;
fi;
# updating snippets
# snippetek frissítése
update_snippets() {
file=$(curl -fsSL https://raw.githubusercontent.com/nyuszika7h/snippets/master/update_snippets.sh | bash -s - --selfupdate | tee >&2 | tail -1 | cut -d' ' -f2)
source "$file"
}
update_snippets
@0xallie
0xallie / AutoResize.avsi
Last active September 6, 2021 07:15
AutoResize function for AviSynth - intelligent resize to 1080p, 720p, SD (720px wide) or any custom resolution
### Changelog ###
# - Moved rounding function as standalone function (RoundHalfToEven.avsi). Don't use mod2 when calculating the height of yv24/yv16.
# - Round to the nearest even when the fraction is 0.5. Mode is changed to integer when mode "sd" is not used.
# - Added Crop() for cropping values >(-)1.
# - Added left, top, right, bottom, fill_margins parameters.
# - Added dither_type parameter.
### AutoResize function for AviSynth - intelligent resize to 1080p, 720p, SD (720px wide) or any custom resolution