All pastes #636637 Raw Edit

Anonym

public text v1 · immutable
#636637 ·published 2007-07-28 02:23 UTC
rendered paste body
#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");
}