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.

29 lines
1.0 KiB

1 year ago
  1. import deathbycaptcha
  2. # DBC account username and password here.
  3. dbcusername = 'vivin'
  4. dbcpassword = 'asucysis'
  5. # Use deathbycaptcha.HttpClient for HTTP API.
  6. client = deathbycaptcha.SocketClient(dbcusername, dbcpassword)
  7. try:
  8. #balance = client.get_balance()
  9. # Put your CAPTCHA file name or file-like object
  10. captcha_file_name = "captcha.png" #Enter image file name h
  11. timeout = 60
  12. # solving timeout (in seconds) here:
  13. captcha = client.decode(captcha_file_name, timeout)
  14. if captcha:
  15. # The CAPTCHA was solved; captcha["captcha"] item holds its
  16. # numeric ID, and captcha["text"] item its text.
  17. fo = open("answer.txt", "w")
  18. fo.write(captcha["text"])
  19. print("CAPTCHA %s solved: %s" % (captcha["captcha"], captcha["text"]))
  20. fo.close()
  21. #return captcha
  22. except deathbycaptcha.AccessDeniedException:
  23. print("Exception in Death by Captcha!")
  24. pass
  25. #def report_dbc(captcha):
  26. #client.report(captcha["captcha"])
  27. #try_captcha()