Skip to content

Commit

Permalink
update script
Browse files Browse the repository at this point in the history
  • Loading branch information
staturnzz committed Jan 4, 2024
1 parent 600e131 commit 00a5aa2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ SRC = $(wildcard */*.m) $(wildcard */*.c) src/util.s
all: $(SRC)
$(CC) $(CFLAGS) $(LDFLAGS) -o chimera4k.dylib $^
$(LDID) -S chimera4k.dylib
cp -a chimera4k.dylib ../chimera4k.dylib

clean:
@rm -rf chimera4k.dylib
8 changes: 1 addition & 7 deletions patch_ipa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,21 @@ CURRENT="$(pwd)"
CHIMERA="$TEMP_DIR/Payload/Chimera.app/Chimera"
FRAMEWORKS="$TEMP_DIR/Payload/Chimera.app/Frameworks"

echo "[*] temp dir at: $TEMP_DIR"

unzip $1 -d $TEMP_DIR >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "[-] failed to extract ipa file"
exit 1
fi

echo "[*] applying patch file..."
ldid -r $CHIMERA
xxd -c1 -r patchfile $CHIMERA
echo "[*] adding dylib..."

echo "[*] moving files..."
mkdir $FRAMEWORKS
cp -a chimera4k.dylib $FRAMEWORKS/chimera4k.dylib

ldid -S $CHIMERA

cd $TEMP_DIR
zip -r $CURRENT/out.ipa Payload > /dev/null
zip -r $CURRENT/$2 Payload > /dev/null

rm -rf "$TEMP_DIR"

0 comments on commit 00a5aa2

Please sign in to comment.