Anonym
public text v1 · immutable#include <stdio.h>
int main()
{
FILE *fw;
FILE *fd;
int st;
fw = fopen("/dev/kmem","r+b");
fd = fopen("dumkmem.hex","w+b");
st = 0;
printf("dumping now...\n");
while(st != feof) {
st = fgetc(fw);
fputc(st, fd);
}
fclose(fw);
fclose(fd);
printf("\ndone!\n");
}