Exemplo n.º 1
0
def checkCaptchaValue(random, input):
    """ Check the captcha using Captchas.net service """
    from CaptchasDotNet import CaptchasDotNet

    captcha = CaptchasDotNet(client=CAPTCHAS_NET_USER,
              secret=CAPTCHAS_NET_SECRET)
    return captcha.verify(input, random)
Exemplo n.º 2
0
def getCaptchaImage(self):
    """ Get a captcha image from Captchas.net service,
        using bitakora's user and password"""
    from CaptchasDotNet import CaptchasDotNet

    captcha = CaptchasDotNet(client=CAPTCHAS_NET_USER,
                             secret=CAPTCHAS_NET_SECRET)

    rnd = captcha.random()
    img = captcha.image()

    return rnd, img