Tags: warmup rev 

Rating:

# yowhatsthepassword - Beginner (50 pts)

## Description
> hey I lost the password :(

### Provided files
`main.py` - a Python script \[[download](https://ctfnote.shinmai.wtf:31337/files/downloadFile?id=RQFxntJKah4sleP)\]

### Ideas and observations
1. a comment in the script purpots the task is to guess a number between 0 and 2**32
2. the value the user inputs is compared agains a value generated from a base64 encoded string
3. if the values match, it's used to seed Python's random number generator and random integers between 97 and 126 are generated until one matches `ord('}')`

### Notes
1. we can just take the comparison value from the script and feed it ot the generator function to get the flag

### Solution script
```python
import random

random.seed(2536466855)
c = 0
while c != ord('}'):
c = random.randint(97, 126)
print(end=chr(c))
print()
```

`wctf{ywtp}`

Original writeup (https://gist.github.com/shinmai/5720d1f0a214d0878cfb530eb975c469#yowhatsthepassword---beginner-50-pts).