forked from dechaoqiu/atosl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuuid_reader.c
More file actions
35 lines (32 loc) · 795 Bytes
/
Copy pathuuid_reader.c
File metadata and controls
35 lines (32 loc) · 795 Bytes
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
/*
* =====================================================================================
*
* Filename: uuid_reader.c
*
* Description
*
* Version: 1.0
* Created: 24/03/13 13:44:40
* Revision: none
* Compiler: gcc
*
* Author: YOUR NAME (),
* Organization:
*
* =====================================================================================
*/
#include <stdio.h>
#include <assert.h>
#include "macho.h"
int main(int argc, char *argv[]){
char *full_filename = argv[1];
struct target_file *tf = parse_file(full_filename);
int i = 0;
while (i < tf->numofarchs){
char uuid[32] = {0};
get_uuid_of_thin(tf->thin_machos[i], uuid);
printf("%s\n", uuid);
i++;
}
return 0;
}