Let's say we have a simple crackme, which asks for a password. After verifying it, `eax` will contain `1` if it is correct, and `0` otherwise. Is there a way (I am interested both in Linux and Windows) for automating the following:

1. Load executable
2. Put breakpoint at a known address
3. Provide a password as input for the executable
4. When reaching the breakpoint set `eax` to `1`
5. Save any output of the executable