Because we're damned if we do, and we're damned if we don't!
This is a simple PoC script for using the Python-Tesseract Python library for the purpose of CAPTCHA breaking.
The script is adapted from a version by Andreas Riancho on the bonsai-sec.com blog. It has been altered to use the Python-Tesseract module instead of the pytesser version he originally used. It has also been tuned a little to prepare CAPTCHA images from the scr.im service.
Example of image preparation:
.... from tesseract import image_to_string image = Image.open('input.tif') print image_to_string(image)
- [PoC] scr.im.tesseract.py script –> here
- Python OCR… or how to break CAPTCHAs –> here
- Breaking Weak CAPTCHA in 26 Lines of Code –> bonsai-sec.com
- Pytesser –> here
- Tesseract-OCR –> here
- Python-Tesseract –> here