Skip to content

Commit d770e57

Browse files
committed
增加显示沙盒信息
增加显示沙盒信息
1 parent 18ab8f7 commit d770e57

File tree

5 files changed

+24
-16
lines changed

5 files changed

+24
-16
lines changed

MJAppTools/Models/MJApp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
@interface MJApp : NSObject
1414

1515
@property(copy, nonatomic, readonly) NSString *bundlePath;
16+
@property(copy, nonatomic, readonly) NSString *dataPath;
1617
@property(copy, nonatomic, readonly) NSString *bundleIdentifier;
1718
@property(copy, nonatomic, readonly) NSString *displayName;
1819
@property(copy, nonatomic, readonly) NSString *executableName;

MJAppTools/Models/MJApp.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
@interface MJApp()
1616
@property(copy, nonatomic) NSString *bundlePath;
17+
@property(copy, nonatomic) NSString *dataPath;
1718
@property(copy, nonatomic) NSString *bundleIdentifier;
1819
@property(copy, nonatomic) NSString *displayName;
1920
@property(copy, nonatomic) NSString *executableName;
@@ -37,6 +38,7 @@ - (instancetype)initWithInfo:(FBApplicationInfo *)info
3738
self.displayName = displayName;
3839
self.bundleIdentifier = info.bundleIdentifier;
3940
self.bundlePath = info.bundleURL.path;
41+
self.dataPath = info.dataContainerURL.path;
4042
}
4143
return self;
4244
}

MJAppTools/SystemHeaders/LSApplicationProxy.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@
119119
@property (nonatomic, readonly) NSString *watchKitVersion;
120120
@property (getter=isWhitelisted, nonatomic, readonly) BOOL whitelisted;
121121

122-
// Image: /System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices
123-
124122
+ (id)applicationProxyForBundleURL:(id)arg1;
125123
+ (id)applicationProxyForCompanionIdentifier:(id)arg1;
126124
+ (id)applicationProxyForIdentifier:(id)arg1;

MJAppTools/main.m

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
#import <UIKit/UIKit.h>
1212
#import "MJPrintTools.h"
1313

14+
#define MJEncryptedString @"加壳"
15+
#define MJDecryptedString @"未加壳"
16+
1417
#define MJPrintNewLine printf("\n")
1518
#define MJPrintDivider(n) \
1619
for (int i = 0; i<(n); i++) { \
@@ -47,12 +50,12 @@ int main(int argc, const char * argv[]) {
4750

4851
[MJPrintTools printColor:MJPrintColorTip format:@" -le <regex>"];
4952
[MJPrintTools print:@"\t列出用户安装的"];
50-
[MJPrintTools printColor:MJPrintColorCrypt format:@"加密"];
53+
[MJPrintTools printColor:MJPrintColorCrypt format:MJEncryptedString];
5154
[MJPrintTools print:@"应用\n"];
5255

5356
[MJPrintTools printColor:MJPrintColorTip format:@" -ld <regex>"];
5457
[MJPrintTools print:@"\t列出用户安装的"];
55-
[MJPrintTools printColor:MJPrintColorCrypt format:@"未加密"];
58+
[MJPrintTools printColor:MJPrintColorCrypt format:MJDecryptedString];
5659
[MJPrintTools print:@"应用\n"];
5760
return 0;
5861
}
@@ -103,6 +106,10 @@ void list_app(MJApp *app, int index)
103106
[MJPrintTools print:@" "];
104107
[MJPrintTools printColor:MJPrintColorPath format:app.bundlePath];
105108

109+
MJPrintNewLine;
110+
[MJPrintTools print:@" "];
111+
[MJPrintTools printColor:MJPrintColorPath format:app.dataPath];
112+
106113
if (app.executable.isFat) {
107114
MJPrintNewLine;
108115
[MJPrintTools print:@" "];
@@ -126,9 +133,9 @@ void list_apps(MJListAppsType type, NSString *regex)
126133
[MJPrintTools printColor:MJPrintColorCount format:@"%zd", apps.count];
127134
[MJPrintTools print:@""];
128135
if (type == MJListAppsTypeUserDecrypted) {
129-
[MJPrintTools printColor:MJPrintColorCrypt format:@"未加密"];
136+
[MJPrintTools printColor:MJPrintColorCrypt format:MJDecryptedString];
130137
} else if (type == MJListAppsTypeUserEncrypted) {
131-
[MJPrintTools printColor:MJPrintColorCrypt format:@"加密"];
138+
[MJPrintTools printColor:MJPrintColorCrypt format:MJEncryptedString];
132139
}
133140
[MJPrintTools print:@"应用"];
134141

@@ -147,6 +154,6 @@ void list_machO(MJMachO *machO)
147154
[MJPrintTools printColor:MJPrintColorArch format:machO.architecture];
148155
if (machO.isEncrypted) {
149156
[MJPrintTools print:@" "];
150-
[MJPrintTools printColor:MJPrintColorCrypt format:@"加密"];
157+
[MJPrintTools printColor:MJPrintColorCrypt format:MJEncryptedString];
151158
}
152159
}

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55

66
## 目前已有的功能
77

8-
- 彩色打印 + 正则搜索
8+
- 正则搜索
99
- 列出用户安装的所有应用
1010
- 列出用户安装的所有加壳应用
11-
- 列出用户安装的所有脱壳应用
11+
- 列出用户安装的所有未加壳应用
1212
- 应用信息
1313
- 应用名称
1414
- Bundle Identifier
15-
- Bundle URL
15+
- Bundle URL(Main Bundle)
16+
- Data URL(Sandbox)
1617
- 架构信息(Architecture)
1718
- 架构名称(Architecture Name)
1819
- 加壳信息(Cryptid)
@@ -58,22 +59,21 @@ chmod +x /usr/bin/MJAppTools
5859

5960
### 5、开始使用MJAppTools
6061

61-
![](https://images2017.cnblogs.com/blog/497279/201801/497279-20180128160520912-1432195115.png)
62+
![](https://images2017.cnblogs.com/blog/497279/201801/497279-20180129122122859-304167009.png)
6263

6364

6465

6566
## 用法
6667

6768
### 搜索用户安装的所有应用
68-
69-
![](https://images2017.cnblogs.com/blog/497279/201801/497279-20180128221025584-441116962.png)
69+
![](https://images2017.cnblogs.com/blog/497279/201801/497279-20180129122149625-343565107.png)
7070

7171
### 支持正则搜索
7272
- 搜索名称
73-
![](https://images2017.cnblogs.com/blog/497279/201801/497279-20180128221554725-1505248222.png)
73+
![](https://images2017.cnblogs.com/blog/497279/201801/497279-20180129122156265-61789802.png)
7474

7575
- 搜索ID
76-
![](https://images2017.cnblogs.com/blog/497279/201801/497279-20180128221635897-1734040701.png)
76+
![](https://images2017.cnblogs.com/blog/497279/201801/497279-20180129122206250-1877490399.png)
7777

7878
- 搜索路径
79-
![](https://images2017.cnblogs.com/blog/497279/201801/497279-20180129014550003-918385208.png)
79+
![](https://images2017.cnblogs.com/blog/497279/201801/497279-20180129122212906-911472208.png)

0 commit comments

Comments
 (0)