from PIL import Image from operator import itemgetter import os, hashlib, time, sys, subprocess, platform class CIntruderOCR(object): """ Class to apply OCR techniques into captchas """ def __init__(self, captcha): # initialize main CIntruder try: im = Image.open(captcha) im2 = Image.new("P", im.size, 255) im = im.convert("P") im.show() except: print "Error during OCR process!. is that captcha supported?\n" return if __name__ == "__main__": if sys.argv[1:]: ocr = CIntruderOCR(sys.argv[1:]) print ("Data correctly extracted!") else: print ("You must set a captcha to learn. ex: test.gif")
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)