Feeling lucky? I have just the challenge for you :D
The basic idea is set a seed for
rand() so that 3 key is same as the requirements.
Because both function are called in the main. The function
seed() and function
welcome share the same stack address.
On the other hand,
seed() just return the value on the stack. In this case, the stack will looks like this.
stack for welcome stack for seed
Therefore, we can control the value of lol (which is the seed) by write last 4 bytes in function
now, we just need to find the correct seed by using the script below
from pwn import *