15 lines
295 B
C
15 lines
295 B
C
#include <stdio.h>
|
|
#include <unistd.h>
|
|
#include "helpers.h"
|
|
|
|
uint64_t num_addr = 0x4020;
|
|
|
|
void test() {
|
|
uint32_t pid = getpid();
|
|
uint64_t base = get_base_address(pid);
|
|
printf("pid: %u, base: %p\n", pid, base);
|
|
|
|
int* num = (int*)(base + num_addr);
|
|
printf("%d\n", *num);
|
|
}
|