Rating: 3.0

It's easy but it took time to find the correct coordinates

```python
#!/usr/bin/python2

import requests, re
from PIL import Image, ImageDraw

def parse(html):
l = re.findall(r'

  • ([^<]+)
  • ', html)
    ans = []
    for i in xrange(0, len(l), 5):
    options = map(int, l[i+1:i+5])
    print "%s - [%s]" % (l[i], ', '.join(l[i+1:i+5]))
    val = eval(l[i])
    ans.append(options.index(val))
    return ans

    def solve(ans):
    x, y, r = 362, 460, 24
    img = Image.open("scantron.png")
    d = ImageDraw.Draw(img)
    for i in xrange(len(ans)):
    sol = ans[i]
    a = x+68*sol+(i/10)*(220+68*4)
    b = y + 90*(i % 10)
    d.ellipse([a-r, b-r, a+r, b+r], fill='black')
    img.save(open("solution.png", "wb"), "png")

    s = requests.Session()
    url = "http://ee.sunshinectf.org/exam"
    resp = s.get(url)
    count = 1
    while True:
    t = resp.text
    if t[:4] != '<h1>':
    print t
    break
    print "Section", count
    count += 1
    ans = parse(t)
    solve(ans)
    resp = s.post(url, files={ 'file': open('solution.png', 'rb') })
    s.close()
    ```