Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Bypass Captcha using 10 lines of code with Python, OpenCV & Tesseract OCR engine
import cv2.cv as cv
import tesseract
gray = cv.LoadImage('captcha.jpeg', cv.CV_LOAD_IMAGE_GRAYSCALE)
cv.Threshold(gray, gray, 231, 255, cv.CV_THRESH_BINARY)
api = tesseract.TessBaseAPI()
api.Init(".","eng",tesseract.OEM_DEFAULT)
api.SetVariable("tessedit_char_whitelist", "0123456789abcdefghijklmnopqrstuvwxyz")
api.SetPageSegMode(tesseract.PSM_SINGLE_WORD)
tesseract.SetCvImage(gray,api)
print api.GetUTF8Text()
@neodouglas
Copy link

neodouglas commented Nov 29, 2021

how i can solve that?
007444
002952
002963
004058
004967
005589

@AlexanderMortimer
Copy link

AlexanderMortimer commented Dec 6, 2021

it is not working for my captcha @jtanori
1

@DiMiTriFrog
Copy link

DiMiTriFrog commented May 13, 2022

it is not working for my captcha @jtanori
1

Any solutions nowadays?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment