aboutsummaryrefslogtreecommitdiffstats
path: root/src/vm.h
diff options
context:
space:
mode:
authorOrfeas <38209077+0xfea5@users.noreply.github.com>2024-04-16 03:33:40 +0300
committerOrfeas <38209077+0xfea5@users.noreply.github.com>2024-04-16 04:09:21 +0300
commit7de6d2226b9746e2a2d90a00aa130282cb23605d (patch)
treed98fd7dbdc816ced520e92a3be202d0ce0b32bbd /src/vm.h
parentParse /proc/pid/maps (diff)
downloadlinux-game-trainer-7de6d2226b9746e2a2d90a00aa130282cb23605d.tar.gz
linux-game-trainer-7de6d2226b9746e2a2d90a00aa130282cb23605d.zip
Memory scanning to find byte patterns
Diffstat (limited to 'src/vm.h')
-rw-r--r--src/vm.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/vm.h b/src/vm.h
index 25849e7..4a994f9 100644
--- a/src/vm.h
+++ b/src/vm.h
@@ -3,8 +3,8 @@
3#include <stdint.h> 3#include <stdint.h>
4 4
5typedef struct VMMapping { 5typedef struct VMMapping {
6 uint64_t begin; 6 void *begin;
7 uint64_t end; 7 void *end;
8 uint8_t r:1; 8 uint8_t r:1;
9 uint8_t w:1; 9 uint8_t w:1;
10 uint8_t x:1; 10 uint8_t x:1;
@@ -14,6 +14,14 @@ typedef struct VMMapping {
14 struct VMMapping *next; 14 struct VMMapping *next;
15} VMMapping; 15} VMMapping;
16 16
17typedef struct MemscanResult {
18 VMMapping *mapping;
19 off_t offset;
20 struct MemscanResult *next;
21} MemscanResult;
22
17VMMapping* parse_vmmap (int pid); 23VMMapping* parse_vmmap (int pid);
18 24
25MemscanResult* memscan(int pid, uint8_t *byte_seq, uint64_t byte_seq_len);
26
19#endif // _VM_H_ 27#endif // _VM_H_