-
Notifications
You must be signed in to change notification settings - Fork 3
/
mbrChunker.h
executable file
·56 lines (49 loc) · 1.37 KB
/
mbrChunker.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
/* SVN FILE: $Id: mbrChunker.h 19 2010-07-30 00:52:44Z jd $*/
/*
* Project Name : mbrChunker.h header file
* $Author: jd $
* $Date: 2010-07-29 20:52:44 -0400 (Thu, 29 Jul 2010) $
* $Revision: 19 $
* $LastChangedBy: jd $
* $URL: file:$
*/
#ifndef MBRCHUNKER_H_
#define MBRCHUNKER_H_
#define PROGRAM_NAME "mbrChunker"
#define AUTHOR "JD Durick <[email protected]>"
#define WEBSITE "http://vmforensics.org"
#define VERSION "0.3 $Rev: 19 $"
#define DEFAULT_BLOCKSIZE 1024
#define HEXSTRING_MAX 16
#define HEX_SIZE 256
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <ctype.h>
#include <inttypes.h>
#include <errno.h>
/*
* Function prototypes
*/
off_t getfilesize(FILE*fp);
void usage(char *);
void getpe1(int[]);
int getendcylinder(int[]);
int getsectorspertrack(int);
int getcylinders(int[]);
int getheadspertrack(int[]);
void printvmdkfile(char *, char *, long, int, int, int);
void parsePartitionEntries(char *masterbootrec, FILE *);
void mbrAnalysis(FILE *, char *, char *, long long);
char *getMBR(FILE *);
char* dec2hex(int);
int validatePartitionType(char *, FILE *);
int analyzePartitions(int[], int, FILE *);
void end_of_sector_marker(char *, FILE *);
void hxsearch(FILE *, char *, long long, long);
char *allocateBuffer(FILE *fptr, long long);
#endif /* MBRCHUNKER_H_ */