Using vb.net how to extract text from captcha images
Asked
Active
Viewed 8,543 times
-1
-
1This is not how things are done here. Please read our [FAQ](http://stackoverflow.com/faq) to see what kinds of answers are accepted here. – Oded May 24 '12 at 11:40
-
Isn't the precise purpose of captcha images that you should not be able to (easily) get the text from them using any programming language and avoid hacking and spamming? I guess we're not on the same team here... – mortb May 24 '12 at 11:45
1 Answers
2
A little research on your part can go a long way. To answer your question, there is a service called "Death By Captcha" (http://www.deathbycaptcha.eu). They have a .NET API and they are pretty reliable.
Here is sample C# code for decoding a captcha:
// Do not forget to reference DeathByCaptcha.dll in your project!
using DeathByCaptcha;
// Put your DBC credentials here.
// Use HttpClient class if you want to use HTTP API.
Client client = (Client) new SocketClient(USERNAME, PASSWORD);
// Put your CAPTCHA file name, stream, or vector of bytes,
// and desired timeout (in seconds) here:
Captcha captcha = client.Decode(CAPTCHA_FILE_NAME, TIMEOUT);
if (captcha.Solved && captcha.Correct) {
Console.WriteLine("CAPTCHA {0}: {1}", captcha.Id, captcha.Text);
// Report the CAPTCHA if solved incorrectly.
// Make sure the CAPTCHA was in fact incorrectly solved!
if ( ... ) {
client.Report(captcha);
}
}
// Repeat for other CAPTCHAs
Easy to translate to VB

Cody Gray - on strike
- 239,200
- 50
- 490
- 574

Robert Beaubien
- 3,126
- 4
- 22
- 29
-
-
3Good luck. This was the cheapest/easiest solution I found to automate what I needed. – Robert Beaubien May 24 '12 at 23:55