Skip to content

Commit

Permalink
fix: ipas with no entitlements
Browse files Browse the repository at this point in the history
  • Loading branch information
asdfzxcvbn committed Jun 25, 2024
1 parent db1f616 commit 0aadb3f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions appdupe.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,12 @@

# step 3: obtain file entitlements
ENT_PROC = subprocess.run(["ldid", "-e", EXEC_PATH], capture_output=True)

# some IPAs have no entitlements, so just use empty dict in this case
try:
ENT_PROC.check_returncode()
except subprocess.CalledProcessError as err:
exit(f"[!] error checking entitlements:\n{err.output.decode()}")
entitlements = plistlib.loads(ENT_PROC.stdout)
entitlements = plistlib.loads(ENT_PROC.stdout)
except Exception:
entitlements = {}

# step 4: modify everything lol
plist["CFBundleIdentifier"] = BUNDLE
Expand Down

0 comments on commit 0aadb3f

Please sign in to comment.