-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstproxy_browse_installed_app.py
100 lines (90 loc) · 2.03 KB
/
instproxy_browse_installed_app.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#!/usr/bin/env python
import os
import sys
import time
import plist
from imobiledevice import *
"""
### key for ReturnAttributes:
ApplicationDSID
ApplicationType
BuildMachineOSBuild
CFBundleDevelopmentRegion
CFBundleDisplayName
CFBundleDocumentTypes
CFBundleExecutable
CFBundleIcons
CFBundleIdentifier
CFBundleInfoDictionaryVersion
CFBundleName
CFBundleNumericVersion
CFBundlePackageType
CFBundleShortVersionString
CFBundleSignature
CFBundleSupportedPlatforms
CFBundleURLTypes
CFBundleVersion
Container
DTCompiler
DTPlatformBuild
DTPlatformName
DTPlatformVersion
DTSDKBuild
DTSDKName
DTXcode
DTXcodeBuild
Entitlements
EnvironmentVariables
Fabric
IsUpgradeable
LSRequiresIPhoneOS
MinimumOSVersion
NSPhotoLibraryUsageDescription
Path
SequenceNumber
SignerIdentity
UIDeviceFamily
UILaunchImages
UIMainStoryboardFile
UIPrerenderedIcon
UIStatusBarHidden
UIStatusBarStyle
UIStatusBarTintParameters
UISupportedInterfaceOrientations
UTExportedTypeDeclarations
UTImportedTypeDeclarations
"""
def lockdown_get_service_client(service_class):
ld = LockdownClient(iDevice())
return ld.get_service_client(service_class)
def list_installed_app(app_type="Any"):
instproxy = lockdown_get_service_client(InstallationProxyClient)
client_options = plist.Dict({
"ApplicationType": app_type,
"ReturnAttributes": plist.Array([
"CFBundleIdentifier",
"CFBundleName",
"CFBundleVersion",
"Container",
"CFBundleDocumentTypes",
"Entitlements",
"Path",
"EnvironmentVariables",
"ApplicationType",
"UIPrerenderedIcon",
"UTExportedTypeDeclarations",
"UTImportedTypeDeclarations",
"UIFileSharingEnabled"
]),
})
return instproxy.browse(client_options)
def printf_app_bundles(app_list):
for app in app_list:
app_name = app["CFBundleName"].get_value().encode("utf8")
print "%s - %s %s" % (app["CFBundleIdentifier"], app_name, app["CFBundleVersion"])
def main():
#app_list = list_installed_app("System")
app_list = list_installed_app()
printf_app_bundles(app_list)
if __name__ == '__main__':
main()