mirror of
https://github.com/objective-see/TaskExplorer.git
synced 2026-03-22 07:02:39 +00:00
initial commit
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
//
|
||||
// Task.h
|
||||
// TaskExplorer
|
||||
//
|
||||
// Created by Patrick Wardle on 5/2/15.
|
||||
// Copyright (c) 2015 Lucas Derraugh. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Binary.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
|
||||
/*
|
||||
|
||||
//32bit
|
||||
struct dyld_image_info_32 {
|
||||
int imageLoadAddress;
|
||||
int imageFilePath;
|
||||
int imageFileModDate;
|
||||
};
|
||||
|
||||
*/
|
||||
|
||||
@interface Task : NSObject
|
||||
{
|
||||
//pid
|
||||
NSNumber* pid;
|
||||
|
||||
//uid
|
||||
uid_t uid;
|
||||
|
||||
//main binary
|
||||
Binary* binary;
|
||||
|
||||
//app bundle
|
||||
// ->only for apps of course...
|
||||
//NSBundle* bundle;
|
||||
|
||||
//process's full path
|
||||
// ->e.g. /Applications/Calculator.app/Contents/MacOS/Calculator
|
||||
//NSString* path;
|
||||
|
||||
//process's name
|
||||
// ->e.g Calculator
|
||||
//NSString* name;
|
||||
|
||||
//icon
|
||||
//NSImage* icon;
|
||||
|
||||
//parent id
|
||||
NSNumber* ppid;
|
||||
|
||||
//children (for tree view)
|
||||
NSMutableArray* children;
|
||||
}
|
||||
|
||||
|
||||
@property (nonatomic, retain)NSNumber* pid;
|
||||
|
||||
//main binary
|
||||
@property(nonatomic, retain)Binary* binary;
|
||||
|
||||
//process args
|
||||
@property(nonatomic, retain)NSMutableArray* arguments;
|
||||
|
||||
//loaded dylibs
|
||||
@property(nonatomic, retain)NSMutableArray* dylibs;
|
||||
|
||||
//open files
|
||||
@property(nonatomic, retain)NSMutableArray* files;
|
||||
|
||||
//connections
|
||||
@property(nonatomic, retain)NSMutableArray* connections;
|
||||
|
||||
@property uid_t uid;
|
||||
@property (nonatomic, retain)NSNumber* ppid;
|
||||
|
||||
|
||||
//signing info
|
||||
@property(nonatomic, retain)NSDictionary* signingInfo;
|
||||
|
||||
//children
|
||||
@property (nonatomic, retain)NSMutableArray* children;
|
||||
|
||||
|
||||
/* METHODS */
|
||||
|
||||
//init w/ a pid + path
|
||||
// note: icons are dynamically determined only when process is shown in alert
|
||||
-(id)initWithPID:(NSNumber*)taskPID andPath:(NSString*)taskPath;
|
||||
|
||||
//get command-line args
|
||||
-(void)getArguments;
|
||||
|
||||
-(void)generateBinaryInfo;
|
||||
|
||||
//enumerate all dylibs
|
||||
// ->new ones are added to 'existingDylibs' (global) dictionary
|
||||
-(void)enumerateDylibs:(NSXPCConnection*)xpcConnection allDylibs:(NSMutableDictionary*)allDylibs;
|
||||
|
||||
//enumerate all open files
|
||||
-(void)enumerateFiles:(NSXPCConnection*)xpcConnection;
|
||||
|
||||
//enumerate network sockets/connections
|
||||
-(void)enumerateNetworking:(NSXPCConnection*)xpcConnection;
|
||||
|
||||
|
||||
|
||||
//get UID for process (by pid)
|
||||
//-(void)determineUID;
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user