CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/external/source/exploits/CVE-2017-13861/common.h
Views: 11780
1
#ifndef COMMON_H
2
#define COMMON_H
3
4
#include <stdint.h> // uint*_t
5
6
//#define LOG(str, args...) do {} while(0)
7
//#define LOG(str, args...) do { NSLog(@str, ##args); } while(0)
8
//#define LOG(str, args...) do { fprintf(stderr, str, ##args); } while(0)
9
10
#ifdef __LP64__
11
# define ADDR "0x%016llx"
12
# define MACH_HEADER_MAGIC MH_MAGIC_64
13
# define MACH_LC_SEGMENT LC_SEGMENT_64
14
typedef struct mach_header_64 mach_hdr_t;
15
typedef struct segment_command_64 mach_seg_t;
16
typedef uint64_t kptr_t;
17
#else
18
# define ADDR "0x%08x"
19
# define MACH_HEADER_MAGIC MH_MAGIC
20
# define MACH_LC_SEGMENT LC_SEGMENT
21
typedef struct mach_header mach_hdr_t;
22
typedef struct segment_command mach_seg_t;
23
typedef uint32_t kptr_t;
24
#endif
25
typedef struct load_command mach_lc_t;
26
27
#endif
28
29