Pwnable/공부 (2) 썸네일형 리스트형 포너블 공부용 사이트 정리 보호되어 있는 글입니다. Windows 32bit 환경에서 버퍼오버플로우 기초 실습 오늘은 BOF를 통해서 계산기를 띄우는 걸 해볼 것이다. BOF 실습을 위한 프로그램을 제작한다. test.txt의 파일 사이즈와 test.txt의 내용을 출력하는 프로그램이다. #include #include #include int get_filesize(FILE *fp){ int filesize; fseek(fp, 0, SEEK_END); filesize = ftell(fp); fseek(fp, 0, SEEK_SET); return filesize; } int main() { FILE *fp; char buf[64]; int filesize; fp = fopen("test.txt", "rb"); filesize = get_filesize(fp); if (filesize == -1) { return 0.. 이전 1 다음