this is based on calsyslab project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

30 lines
1.0 KiB

import deathbycaptcha
# DBC account username and password here.
dbcusername = 'vivin'
dbcpassword = 'asucysis'
# Use deathbycaptcha.HttpClient for HTTP API.
client = deathbycaptcha.SocketClient(dbcusername, dbcpassword)
try:
#balance = client.get_balance()
# Put your CAPTCHA file name or file-like object
captcha_file_name = "captcha.png" #Enter image file name h
timeout = 60
# solving timeout (in seconds) here:
captcha = client.decode(captcha_file_name, timeout)
if captcha:
# The CAPTCHA was solved; captcha["captcha"] item holds its
# numeric ID, and captcha["text"] item its text.
fo = open("answer.txt", "w")
fo.write(captcha["text"])
print("CAPTCHA %s solved: %s" % (captcha["captcha"], captcha["text"]))
fo.close()
#return captcha
except deathbycaptcha.AccessDeniedException:
print("Exception in Death by Captcha!")
pass
#def report_dbc(captcha):
#client.report(captcha["captcha"])
#try_captcha()