File: exports.h

package info (click to toggle)
aflplusplus 4.33c-0.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,740 kB
  • sloc: ansic: 111,574; cpp: 16,019; sh: 4,766; python: 4,546; makefile: 1,000; javascript: 521; java: 43; sql: 3; xml: 1
file content (29 lines) | stat: -rw-r--r-- 730 bytes parent folder | download
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
#ifndef API_H
#define API_H

//# EXPORTS
// Returns 0 on success
int r_mem(unsigned long long addr, unsigned long long len, void *dest);
// // Returns 0 on success
int w_mem(unsigned long long addr, unsigned long long len, void *src);
// Returns num of bytes read; 
int r_reg(unsigned char reg, void *dest);
// // Returns num of bytes written
int w_reg(unsigned char reg, char *src);


//NOTE hook function must be named hook_<16 hex character at_addr>
//NOTE must define function `struct conf* configure()`
struct conf{
    unsigned char IP_reg_num;
    unsigned long long entry_addr;
    unsigned long long* hooks;
    unsigned long long num_hooks;
}conf;

struct ret{
    unsigned long long addr;
    char remove_bp;
};

#endif