I spent a long time getting started with chapter 10.
-
In this code base, meet.c should have return 0; at the end of the main function. Granted, I don't know exactly why this fixes the problem (if you're overwriting the EIP in the stack of a function, why would a missing return in main affect this?). All I know is the book has a return for main, and adding it fixed this code for me.
-
Code in the book is written like python2 but has instructions to use python 3. These small examples are only written in the book, and are not in this repository, so I don't think there's anything to fix on this side.
Example of the problem: (gdb) run Mr python -c 'print("A"*600)'
Should be: (gdb) run Mr python -c 'print(b"A"*600)'
I spent a long time getting started with chapter 10.
In this code base, meet.c should have
return 0;at the end of the main function. Granted, I don't know exactly why this fixes the problem (if you're overwriting the EIP in the stack of a function, why would a missing return in main affect this?). All I know is the book has a return for main, and adding it fixed this code for me.Code in the book is written like python2 but has instructions to use python 3. These small examples are only written in the book, and are not in this repository, so I don't think there's anything to fix on this side.
Example of the problem: (gdb) run Mr
python -c 'print("A"*600)'Should be: (gdb) run Mr
python -c 'print(b"A"*600)'