Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi, now this support for th0r Jailbreak #50

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions bfinject
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ fi


#
# Detect LiberiOS vs Electra
# Detect LiberiOS vs Electra vs Th0r
#
if [ -f /bootstrap/inject_criticald ]; then
# This is Electra
Expand All @@ -138,6 +138,16 @@ if [ -f /bootstrap/inject_criticald ]; then
JTOOL=/bootstrap/usr/local/bin/jtool.liberios
cp bfinject4realz /bootstrap/usr/local/bin/
INJECTOR=/bootstrap/usr/local/bin/bfinject4realz

elif [ -f /electra/inject_criticald ]; then
# This is Th0r
echo "[+] Th0r detected."
cp jtool.liberios /bin/
chmod +x /bin/jtool.liberios
JTOOL=/bin/jtool.liberios
cp bfinject4realz /bin/
INJECTOR=/bin/bfinject4realz

elif [ -f /jb/usr/local/bin/jtool ]; then
# This is LiberiOS
echo "[+] Liberios detected"
Expand All @@ -160,8 +170,8 @@ for DYLIB in ${DYLIBS[@]}; do
fi

# Use random filenames to avoid cached binaries causing "Killed: 9" messages.
RAND=`dd if=/dev/random bs=1 count=16 2>/dev/null | md5`
RANDOM_NAME="${INJECTOR%/*}/`dd if=/dev/random bs=1 count=16 2>/dev/null | md5`"
RAND=`dd if=/dev/random bs=1 count=16 2>/dev/null | md5sum`
RANDOM_NAME="${INJECTOR%/*}/`dd if=/dev/random bs=1 count=16 2>/dev/null | md5sum`"
DYLIB_DIR="/System/Library/Frameworks/${RAND}.framework"
DYLIB_PATH="$DYLIB_DIR/$RAND.dylib"

Expand Down Expand Up @@ -241,4 +251,4 @@ done
#
echo "[+] So long and thanks for all the fish."
clean_up
exit 0
exit 0