Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- from sys import argv
- from subprocess import check_call
- from os.path import basename, splitext, join
- from tempfile import NamedTemporaryFile
- app = argv[-1]
- obj_path = join(app, splitext(basename(app))[0])
- if '-gta' not in argv:
- check_call(['/usr/bin/ldid', '-S', obj_path])
- else:
- with NamedTemporaryFile() as f:
- f.write("""
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
- <plist version="1.0">
- <dict>
- <key>get-task-allow</key>
- <true/>
- </dict>
- </plist>
- """)
- f.flush()
- check_call(['/usr/bin/ldid', '-S' + f.name, obj_path])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement