-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from mwrlabs/develop
V1.0.3
- Loading branch information
Showing
27 changed files
with
197 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// Utils.h | ||
// needleAgent | ||
// | ||
#import <Foundation/Foundation.h> | ||
|
||
|
||
@interface Utils : NSObject | ||
|
||
+ (NSData *)listApplications; | ||
|
||
+(BOOL)copyFile:(NSString *)infile into:(NSString *)outfile; | ||
|
||
@end | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// | ||
// Utils.m | ||
// needleAgent | ||
// | ||
#import "Utils.h" | ||
|
||
// LIST_APPS | ||
#import "LSApplicationWorkspace.h" | ||
#import "FBApplicationInfo.h" | ||
#import "LSApplicationProxy.h" | ||
|
||
@implementation Utils | ||
|
||
|
||
+ (NSMutableDictionary *)listApplications | ||
{ | ||
NSMutableDictionary *all_apps = [NSMutableDictionary new]; | ||
NSDictionary *bundleInfo = nil; | ||
|
||
LSApplicationWorkspace *applicationWorkspace = [LSApplicationWorkspace defaultWorkspace]; | ||
NSArray *proxies = [applicationWorkspace allApplications]; | ||
|
||
for (FBApplicationInfo *proxy in proxies) | ||
{ | ||
NSString *appType = [proxy performSelector:@selector(applicationType)]; | ||
|
||
if ([appType isEqualToString:@"User"] && proxy.bundleContainerURL && proxy.bundleURL) | ||
{ | ||
NSString *itemName = ((LSApplicationProxy*)proxy).itemName; | ||
if (!itemName) | ||
{ | ||
itemName = ((LSApplicationProxy*)proxy).localizedName; | ||
} | ||
|
||
bundleInfo = @{ | ||
@"BundleURL": [proxy.bundleURL absoluteString], | ||
@"BundleContainer": [proxy.bundleContainerURL absoluteString], | ||
@"DataContainer": [proxy.dataContainerURL absoluteString], | ||
@"DisplayName": itemName, | ||
@"BundleIdentifier": proxy.bundleIdentifier, | ||
@"BundleVersion": proxy.bundleVersion, | ||
@"BundleURL": [proxy.bundleURL absoluteString], | ||
@"Entitlements": proxy.entitlements, | ||
@"SDKVersion": proxy.sdkVersion, | ||
@"MinimumOS": ((LSApplicationProxy*)proxy).minimumSystemVersion, | ||
@"TeamID": ((LSApplicationProxy*)proxy).teamID, | ||
}; | ||
all_apps[proxy.bundleIdentifier] = bundleInfo; | ||
} | ||
} | ||
|
||
return all_apps; | ||
} | ||
|
||
|
||
+(BOOL)copyFile:(NSString *)infile into:(NSString *)outfile; | ||
{ | ||
NSError *error; | ||
NSFileManager *fileManager = [NSFileManager defaultManager]; | ||
if(![fileManager createDirectoryAtPath:[outfile stringByDeletingLastPathComponent] | ||
withIntermediateDirectories:YES attributes:nil error:NULL]) | ||
{ | ||
NSLog(@"Failed to create directory at path: %@", [outfile stringByDeletingLastPathComponent]); | ||
return NO; | ||
} | ||
|
||
if ([fileManager fileExistsAtPath:outfile]) | ||
{ | ||
[fileManager removeItemAtPath:outfile error:nil]; | ||
} | ||
|
||
if(![fileManager copyItemAtPath:infile toPath:outfile error:&error]) | ||
{ | ||
NSLog(@"Failed to copy item: %@ to %@", infile, outfile); | ||
NSLog(@"Copy file error: %@", error.localizedDescription); | ||
return NO; | ||
} | ||
return YES; | ||
} | ||
|
||
@end |
Binary file not shown.
12 changes: 12 additions & 0 deletions
12
release/NeedleAgent/Applications/NeedleAgent.app/archived-expanded-entitlements.xcent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>application-identifier</key> | ||
<string>U38MMB3T7J.mwr.needle.agent</string> | ||
<key>keychain-access-groups</key> | ||
<array> | ||
<string>U38MMB3T7J.mwr.needle.agent</string> | ||
</array> | ||
</dict> | ||
</plist> |
Binary file modified
BIN
+0 Bytes
(100%)
release/NeedleAgent/Applications/needleAgent.app/Assets.car
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...ations/needleAgent.app/Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...tions/needleAgent.app/Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib
Binary file not shown.
Binary file modified
BIN
+1.46 MB
(260%)
...Agent/Applications/needleAgent.app/Frameworks/CocoaAsyncSocket.framework/CocoaAsyncSocket
Binary file not shown.
Binary file modified
BIN
+2 Bytes
(100%)
...NeedleAgent/Applications/needleAgent.app/Frameworks/CocoaAsyncSocket.framework/Info.plist
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-3 Bytes
(100%)
release/NeedleAgent/Applications/needleAgent.app/Info.plist
Binary file not shown.
Binary file modified
BIN
-7 Bytes
(100%)
.../NeedleAgent/Applications/needleAgent.app/Main.storyboardc/BF7-WO-YOG-view-ue0-Jf-hdt.nib
Binary file not shown.
Binary file modified
BIN
-7 Bytes
(100%)
...Agent/Applications/needleAgent.app/Main.storyboardc/UINavigationController-EVn-Gp-ziU.nib
Binary file not shown.
Oops, something went wrong.