-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathYOPAPackage.h
executable file
·55 lines (43 loc) · 1.03 KB
/
YOPAPackage.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
//
// YOPAPackage.h
// yopa
//
#import <Foundation/Foundation.h>
#import "YOPASegment.h"
#pragma pack(1)
#define YOPA_HEADER_MAGIC 0xf00dface
#define YOPA_SEGMENT_MAGIC 0xcafef00d //better than mcdonalds
#define ZIP_COMPRESSION 0
#define SEVENZIP_COMPRESSION 7
typedef enum {
YOPA_SEGMENT,
YOPA_FAT_PACKAGE,
UNKNOWN
} YOPAPackageType;
struct yopa_segment {
int16_t compression_type;
uint32_t offset;
uint32_t size;
int16_t required_version; //0 if no required version
char app_bundle[100];
char cracker_name[100];
char cracker_message[4096];
};
struct yopa_header {
uint32_t segment_offsets[10];
char app_bundle[100];
};
@interface YOPAPackage : NSObject
{
NSString* _packagePath;
FILE* _package;
struct yopa_header _header;
NSString* _tmpDir;
}
@property (readonly, nonatomic) YOPAPackageType packageType;
- (id)initWithPackagePath:(NSString*) packagePath;
- (NSString*) processPackage;
- (BOOL) isYOPA;
- (NSString*)getTempDir;
- (void)addSegment:(YOPASegment*)segment;
@end