Provides the capability to write to a memory location constantly in fractional seconds. Mostly used to create a persistent value in a game.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
MemoryOverwriter/testProgram.

20 lines
356 B

#include <stdio.h>
#include <unistd.h>
#include <string.h>
int main() {
char foo[] = "This is some text from proc-1";
printf("Now execute\n");
printf(" sudo ./testProgram2 %d %lx %lu\n", getpid(), (long unsigned int) foo, strlen(foo)+1);
printf("Press any key\n");
while (1) {
getchar();
printf("foo has changed to: %s\n", foo);
}
}