v1ral_ITS

Resign_with_ldid.script

Mar 25th, 2026
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.74 KB | None | 0 0
  1. #scripts For Filza File Manager
  2. #argument $1: file name
  3. #argument $2: file userid:groupid
  4. ##################################
  5. #resign any mach-o file with ldid
  6. #warning: This script will resign ipa file or mach-o file with ldid. Make sure you installed ldid
  7. if [[ $1 =~ \.ipa$ ]]; then
  8.     unzip "$1" &> /dev/null
  9.     if [ -d Payload ]; then
  10.         find . -path './Payload/*' -type f -exec sh -c "ldid -S -M \"{}\";" \;
  11.         chown -R $2 Payload &> /dev/null
  12.         zip -r "${1%.ipa}_resigned.ipa" Payload &> /dev/null
  13.         chown $2 "${1%.ipa}_resigned.ipa"
  14.         rm -rf Payload
  15.     else
  16.         echo "Failed to extract the IPA package"
  17.     fi
  18. else
  19.     cp "$1" "$1_resigned"
  20.     ldid -S -M "$1_resigned"
  21.     chown -R $2 "$1_resigned" &> /dev/null
  22. fi
Advertisement
Add Comment
Please, Sign In to add comment