diff --git a/MJAppTools/Models/MJApp.h b/MJAppTools/Models/MJApp.h index 898688b..60951e1 100644 --- a/MJAppTools/Models/MJApp.h +++ b/MJAppTools/Models/MJApp.h @@ -13,6 +13,7 @@ @interface MJApp : NSObject @property(copy, nonatomic, readonly) NSString *bundlePath; +@property(copy, nonatomic, readonly) NSString *dataPath; @property(copy, nonatomic, readonly) NSString *bundleIdentifier; @property(copy, nonatomic, readonly) NSString *displayName; @property(copy, nonatomic, readonly) NSString *executableName; diff --git a/MJAppTools/Models/MJApp.m b/MJAppTools/Models/MJApp.m index b68fd55..291b5a4 100644 --- a/MJAppTools/Models/MJApp.m +++ b/MJAppTools/Models/MJApp.m @@ -14,6 +14,7 @@ @interface MJApp() @property(copy, nonatomic) NSString *bundlePath; +@property(copy, nonatomic) NSString *dataPath; @property(copy, nonatomic) NSString *bundleIdentifier; @property(copy, nonatomic) NSString *displayName; @property(copy, nonatomic) NSString *executableName; @@ -37,6 +38,7 @@ - (instancetype)initWithInfo:(FBApplicationInfo *)info self.displayName = displayName; self.bundleIdentifier = info.bundleIdentifier; self.bundlePath = info.bundleURL.path; + self.dataPath = info.dataContainerURL.path; } return self; } diff --git a/MJAppTools/SystemHeaders/LSApplicationProxy.h b/MJAppTools/SystemHeaders/LSApplicationProxy.h index 808dee0..da7f824 100644 --- a/MJAppTools/SystemHeaders/LSApplicationProxy.h +++ b/MJAppTools/SystemHeaders/LSApplicationProxy.h @@ -119,8 +119,6 @@ @property (nonatomic, readonly) NSString *watchKitVersion; @property (getter=isWhitelisted, nonatomic, readonly) BOOL whitelisted; -// Image: /System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices - + (id)applicationProxyForBundleURL:(id)arg1; + (id)applicationProxyForCompanionIdentifier:(id)arg1; + (id)applicationProxyForIdentifier:(id)arg1; diff --git a/MJAppTools/main.m b/MJAppTools/main.m index 1fec289..eed9957 100644 --- a/MJAppTools/main.m +++ b/MJAppTools/main.m @@ -11,6 +11,9 @@ #import #import "MJPrintTools.h" +#define MJEncryptedString @"加壳" +#define MJDecryptedString @"未加壳" + #define MJPrintNewLine printf("\n") #define MJPrintDivider(n) \ for (int i = 0; i<(n); i++) { \ @@ -47,12 +50,12 @@ int main(int argc, const char * argv[]) { [MJPrintTools printColor:MJPrintColorTip format:@" -le "]; [MJPrintTools print:@"\t列出用户安装的"]; - [MJPrintTools printColor:MJPrintColorCrypt format:@"加密"]; + [MJPrintTools printColor:MJPrintColorCrypt format:MJEncryptedString]; [MJPrintTools print:@"应用\n"]; [MJPrintTools printColor:MJPrintColorTip format:@" -ld "]; [MJPrintTools print:@"\t列出用户安装的"]; - [MJPrintTools printColor:MJPrintColorCrypt format:@"未加密"]; + [MJPrintTools printColor:MJPrintColorCrypt format:MJDecryptedString]; [MJPrintTools print:@"应用\n"]; return 0; } @@ -103,6 +106,10 @@ void list_app(MJApp *app, int index) [MJPrintTools print:@" "]; [MJPrintTools printColor:MJPrintColorPath format:app.bundlePath]; + MJPrintNewLine; + [MJPrintTools print:@" "]; + [MJPrintTools printColor:MJPrintColorPath format:app.dataPath]; + if (app.executable.isFat) { MJPrintNewLine; [MJPrintTools print:@" "]; @@ -126,9 +133,9 @@ void list_apps(MJListAppsType type, NSString *regex) [MJPrintTools printColor:MJPrintColorCount format:@"%zd", apps.count]; [MJPrintTools print:@"个"]; if (type == MJListAppsTypeUserDecrypted) { - [MJPrintTools printColor:MJPrintColorCrypt format:@"未加密"]; + [MJPrintTools printColor:MJPrintColorCrypt format:MJDecryptedString]; } else if (type == MJListAppsTypeUserEncrypted) { - [MJPrintTools printColor:MJPrintColorCrypt format:@"加密"]; + [MJPrintTools printColor:MJPrintColorCrypt format:MJEncryptedString]; } [MJPrintTools print:@"应用"]; @@ -147,6 +154,6 @@ void list_machO(MJMachO *machO) [MJPrintTools printColor:MJPrintColorArch format:machO.architecture]; if (machO.isEncrypted) { [MJPrintTools print:@" "]; - [MJPrintTools printColor:MJPrintColorCrypt format:@"加密"]; + [MJPrintTools printColor:MJPrintColorCrypt format:MJEncryptedString]; } } diff --git a/README.md b/README.md index 5eae402..ae7096a 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,15 @@ ## 目前已有的功能 -- 彩色打印 + 正则搜索 +- 正则搜索 - 列出用户安装的所有应用 - 列出用户安装的所有加壳应用 - - 列出用户安装的所有脱壳应用 + - 列出用户安装的所有未加壳应用 - 应用信息 - 应用名称 - Bundle Identifier - - Bundle URL + - Bundle URL(Main Bundle) + - Data URL(Sandbox) - 架构信息(Architecture) - 架构名称(Architecture Name) - 加壳信息(Cryptid) @@ -58,22 +59,21 @@ chmod +x /usr/bin/MJAppTools ### 5、开始使用MJAppTools -![](https://images2017.cnblogs.com/blog/497279/201801/497279-20180128160520912-1432195115.png) +![](https://images2017.cnblogs.com/blog/497279/201801/497279-20180129122122859-304167009.png) ## 用法 ### 搜索用户安装的所有应用 - -![](https://images2017.cnblogs.com/blog/497279/201801/497279-20180128221025584-441116962.png) +![](https://images2017.cnblogs.com/blog/497279/201801/497279-20180129122149625-343565107.png) ### 支持正则搜索 - 搜索名称 - ![](https://images2017.cnblogs.com/blog/497279/201801/497279-20180128221554725-1505248222.png) + ![](https://images2017.cnblogs.com/blog/497279/201801/497279-20180129122156265-61789802.png) - 搜索ID - ![](https://images2017.cnblogs.com/blog/497279/201801/497279-20180128221635897-1734040701.png) + ![](https://images2017.cnblogs.com/blog/497279/201801/497279-20180129122206250-1877490399.png) - 搜索路径 - ![](https://images2017.cnblogs.com/blog/497279/201801/497279-20180129014550003-918385208.png) + ![](https://images2017.cnblogs.com/blog/497279/201801/497279-20180129122212906-911472208.png)