1 #include <libcgc.h> 2 #include <stdlib.h> 3 #include <string.h> 4 5 /* Just leak 4 bytes from the flag page, performing a simple mutation on those bytes */ 6 main(int secret_page_i)7int __attribute((fastcall)) main(int secret_page_i) 8 { 9 int ad = 0x44444444; 10 int i; 11 char buf[0x1000]; 12 13 char *secret_page = (void *)secret_page_i; 14 15 memset(buf, 'A', 0x1000); 16 for (i=0;i<0x8;i++) { 17 transmit(1, buf, 0x1000, NULL); 18 } 19 20 transmit(1, secret_page + 10, 4, NULL); 21 } 22