forked from mansoor-s/Linux-Memory-Editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Memory.h
44 lines (37 loc) · 898 Bytes
/
Memory.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
#ifndef MEMORY_H
#define MEMORY_H
#include <iostream>
#include <string.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ptrace.h>
#include <sys/wait.h>
#include <errno.h>
#include <vector>
#include <unistd.h>
#include <fcntl.h>
#include <QString>
#include <QDebug>
#include "VMA.h"
#include "Global.h"
#include "Result.h"
//#define _XOPEN_SOURCE 500
class Memory {
public:
Memory(pid_t pid);
bool setValue (long, BYTE, int); // int fastest
bool getValue (long, BYTE &); // int fastest
//lock value
// lock and allow only greater than
// lock and allow smaller than only
VMA readVMA(VMA region);
std::vector<VMA> vmaList (int);
// void scanVMA(VMA area,std::vector<Result>* results, void* key, long length);
bool attach ();
void detach ();
private:
pid_t m_pid;
std::vector<Result> foundAddrs;
};
#endif // MEMORY_H