From 34729c992c7a835bc1c849a7e729260df230201e Mon Sep 17 00:00:00 2001 From: masbog Date: Tue, 15 Jan 2019 19:50:33 +0700 Subject: [PATCH 1/3] Update bfinject Support for th0r jb iOS 11.2.x--11.3.1/11.4(b3) --- bfinject | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/bfinject b/bfinject index 481ac74..d81dcb9 100755 --- a/bfinject +++ b/bfinject @@ -128,7 +128,7 @@ fi # -# Detect LiberiOS vs Electra +# Detect LiberiOS vs Electra vs Th0r # if [ -f /bootstrap/inject_criticald ]; then # This is Electra @@ -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 Electra + 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" @@ -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" @@ -241,4 +251,4 @@ done # echo "[+] So long and thanks for all the fish." clean_up -exit 0 \ No newline at end of file +exit 0 From 70f6dcb06ddcc9d532a5a7101f4b064e2a3c895b Mon Sep 17 00:00:00 2001 From: masbog Date: Tue, 15 Jan 2019 19:53:49 +0700 Subject: [PATCH 2/3] Update bfinject add th0r jailbreak detection --- bfinject | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bfinject b/bfinject index d81dcb9..6f065fc 100755 --- a/bfinject +++ b/bfinject @@ -140,7 +140,7 @@ if [ -f /bootstrap/inject_criticald ]; then INJECTOR=/bootstrap/usr/local/bin/bfinject4realz elif [ -f /electra/inject_criticald ]; then - # This is Electra + # This is Th0r echo "[+] Th0r detected." cp jtool.liberios /bin/ chmod +x /bin/jtool.liberios From 334d000e0d7e991af5e6761244486bcfb6ca63dc Mon Sep 17 00:00:00 2001 From: Augusta Bogie Date: Tue, 15 Jan 2019 19:57:38 +0700 Subject: [PATCH 3/3] cleanup support th0r --- bfinject | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/bfinject b/bfinject index 481ac74..0ee4cec 100755 --- a/bfinject +++ b/bfinject @@ -128,7 +128,7 @@ fi # -# Detect LiberiOS vs Electra +# Detect LiberiOS vs Electra vs Th0r # if [ -f /bootstrap/inject_criticald ]; then # This is Electra @@ -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" @@ -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"