Solve any Captcha
This method is: 95.9% accurate(last time I checked). This program uses the site captchatrader.com and you'll need an account there.
import urllib, urllib2, sys
if len(sys.argv )<2:
sys.exit("the first argument should be the captcha file")
url = "http://api.captchatrader.com/submit"
api_key = "API_KEY"
passwd = "PASSWORD"
user = "USERNAME"
img = base64.b64encode(open(sys.argv[1]).read())
values = {'api_key' : api_key,'password' : passwd,'username' : user, 'value':img}
data = urllib.urlencode(values)
req = urllib2.Request(url, data)
response = urllib2.urlopen(req)
the_page = response.read().split(",")
the_page = the_page.replace("\"", "")
the_page = the_page.replace("]", "")
print the_page[1]
Just change the variables the top to your credentials then run it using these arguments:
python captcha.py '/image/location/image.jpg'
No comments:
Post a Comment