-
lvl 07 darkelf ->argeWargame/HackerSchool The Load of the BOF Redhat 2019. 3. 14. 14:16
→ 소스코드는 아래와 같다. 1 /* 2 The Lord of the BOF : The Fellowship of the BOF 3 - orge 4 - check argv[0] 5 */ 6 7 #include 8 #include 9 10 extern char **environ; 11 12 main(int argc, char *argv[]) 13 { 14 char buffer[40]; 15 int i; 16 17 if(argc < 2){ 18 printf("argv error\n"); 19 exit(0); 20 } 21 22 // here is changed! 23 if(strlen(argv[0]) != 77){ 24 printf("argv[0] error\n"); 25 exit(0); 26 } 27 28 ..