-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
executable file
·35 lines (24 loc) · 1.07 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/python3
import os
import click
ENTITLEMENTS = os.path.join(os.path.dirname(__file__), 'debugserver_ent.plist')
@click.command()
@click.argument('debugserver', type=click.Path(exists=True))
@click.argument('output')
def main(debugserver, output):
"""
Simple utility for patching the original `debugserver` which comes with XCode in include entitlements
for debugging other processes in a jailbroken device.
The binary can be obtained from:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/<IOS_VERSION>/DeveloperDiskImage.dmg
Just replace the <IOS_VERSION> with your correct version.
"""
if 0 != os.system(f'lipo -thin arm64 {debugserver} -output {output}'):
print('failed lipo execution. verify its installed and in path')
return
if 0 != os.system(f'codesign -s - --entitlements {ENTITLEMENTS} -f --generate-entitlement-der {output}'):
print('failed codesign execution. verify its installed and in path')
return
print('Done. 🍺')
if __name__ == '__main__':
main()