-
Notifications
You must be signed in to change notification settings - Fork 13
/
Filter.h
71 lines (50 loc) · 1.81 KB
/
Filter.h
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
//
// Filter.h
// TaskExplorer
//
// Created by Patrick Wardle on 2/21/15.
// Copyright (c) 2015 Objective-See. All rights reserved.
//
#import "File.h"
#import "Binary.h"
#import <Foundation/Foundation.h>
@interface Filter : NSObject
{
}
/* METHODS */
//determine if search string is #keyword
-(BOOL)isKeyword:(NSString*)searchString;
//check if a binary fulfills a keyword
-(BOOL)binaryFulfillsKeyword:(NSString*)keyword binary:(Binary*)binary;
//keyword filter '#apple'
// ->determine if binary is signed by apple
-(BOOL)isApple:(Binary*)item;
//keyword filter '#signed' (and indirectly #unsigned)
// ->determine if binary is signed
-(BOOL)isSigned:(Binary*)item;
//keyword filter '#flagged'
// ->determine if binary is flagged by VT
-(BOOL)isFlagged:(Binary*)item;
//keyword filter '#encrypted'
// ->determine if binary is encrypted
-(BOOL)isEncrypted:(Binary*)item;
//keyword filter '#packed'
// ->determine if binary is packed
-(BOOL)isPacked:(Binary*)item;
//keyword filter '#notfound'
-(BOOL)notFound:(Binary*)item;
//filter all for global search
// ->tasks, dylibs, files, & connections
-(void)filterAll:(NSString*)filterText items:(NSMutableDictionary*)items results:(NSMutableArray*)results;
//filter tasks
-(void)filterTasks:(NSString*)filterText items:(NSMutableDictionary*)items results:(NSMutableArray*)results pane:(NSUInteger)pane;
//filter dylibs and files
-(void)filterFiles:(NSString*)filterText items:(NSMutableArray*)items results:(NSMutableArray*)results pane:(NSUInteger)pane;
//filter network connections
-(void)filterConnections:(NSString*)filterText items:(NSMutableArray*)items results:(NSMutableArray*)results;
/* PROPERTIES */
//binary filter keywords
@property(nonatomic, retain)NSMutableArray* binaryFilters;
//file filter keywords
@property(nonatomic, retain)NSMutableArray* fileFilters;
@end