Jump to content
arnerob

OCR Captcha

Recommended Posts

Captcha's are specifically designed to beat computer OCR's. Obviously some are better than others.

 

It's certainly possible to beat any captchas with advanced enough OCR. However if you're planning on doing this yourself keep in mind it's probably more work starting from 0 to creating something this advanced than it probably is trying accomplish whatever it is you're doing.

 

That being said most captchas are highly secretive and created by veteran programmers who are probably freelanced by rich and sketchy people.

 

Have fun

Link to comment
Share on other sites

could someone then give me the code?

 

I think you're out of luck there... It requires a great deal of effort to write a captcha solver, furthermore, you generally won't be able to reuse a solver for 2 different types of captchas without it being very complex. So I doubt anyone's just going to write one up for you.

 

You could try a decaptcha service, like DBC: http://www.deathbycaptcha.com

They come at a price though, but it's fairly affordable.

Link to comment
Share on other sites

I tried some things on my own and I found that there were only 9 characters: A, B, C, H, J, 1, 3, 5 ,7; so I don't think that they're very professional.

 

I found in the old manual a function:

 

FindDeformedBitmapToleranceRotationIn(bitmap: Integer; var x, y: Integer; x1, y1, x2, y2: Integer; tolerance: Integer; Range: Integer; var accuracy: Extended; AngleIntervals: Extended; StartAngle, MaxAngle: Extended; var angle: Extended)

 

I tried to make with this command an easy script to recognise if there was a '1' in the captcha. It didn't work so I tried if my script could find 2 blue points next to each other. It didn't work either. Here is my script:

 

[sCAR]program testcolor;

var

ang,acc:extended;

x,y,IMG1:integer;

begin

IMG1 := BitmapFromString(2, 1, 'ceNo79vffsb//ABLdBYM=');

SetTransparentColor(IMG1,0);

 

if FindDeformedBitmapToleranceRotationIn(IMG1,x,y,0,0,90,50,10,10,acc,pi/40,-pi/4,pi/4,ang) then

begin

writeln('found something')

end else

writeln('nothing found')

 

end.[/sCAR]

 

here are the codes: http://www.mafiaway.nl/code.php?time=1333441180

 

What is wrong with my script?

 

PS. Is there a way (command) to let scar pick a bitmap on your screen in a rectangle for a given x1,y1,x2,y2

Edited by arnerob
Link to comment
Share on other sites

I tried some things on my own and I found that there were only 9 characters: A, B, C, H, J, 1, 3, 5 ,7; so I don't think that they're very professional.

 

I found in the old manual a function:

 

FindDeformedBitmapToleranceRotationIn(bitmap: Integer; var x, y: Integer; x1, y1, x2, y2: Integer; tolerance: Integer; Range: Integer; var accuracy: Extended; AngleIntervals: Extended; StartAngle, MaxAngle: Extended; var angle: Extended)

 

I tried to make with this command an easy script to recognise if there was a '1' in the captcha. It didn't work so I tried if my script could find 2 blue points next to each other. It didn't work either. Here is my script:

 

[sCAR]program testcolor;

var

ang,acc:extended;

x,y,IMG1:integer;

begin

IMG1 := BitmapFromString(2, 1, 'ceNo79vffsb//ABLdBYM=');

SetTransparentColor(IMG1,0);

 

if FindDeformedBitmapToleranceRotationIn(IMG1,x,y,0,0,90,50,10,10,acc,pi/40,-pi/4,pi/4,ang) then

begin

writeln('found something')

end else

writeln('nothing found')

 

end.[/sCAR]

 

here are the codes: http://www.mafiaway.nl/code.php?time=1333441180

 

What is wrong with my script?

 

PS. Is there a way (command) to let scar pick a bitmap on your screen in a rectangle for a given x1,y1,x2,y2

 

The bitmap you are looking for, has to be visible on the screen. Try looking for similarities with the Captcha, if you really wanted this to work. You'd have to get a general font that has a good range of sizes. Make bitmaps for each of the letters. Then somehow compare bitmaps. This would be hard to make 100% accurate, it depends on the Captcha implementation. The one I'm thinking of changes sizes, shapes, fonts, constantly so you would never know. Comparing could be done, but it would be very hard. OCR is based off bitmaps of the font's individual letters/numbers.

 

If I were to do it thoroughly and systematically I would first start by comparing shapes. If the captcha mixes colors you are doomed, the text should always be like white or something. If it changes colors then you have to compare that much more lols, maybe use masks, but I have no idea how masks work.

 

So yeah compare masks, shapes to bitmaps of letters, numbers. Try to find the most similar then have the script type the letters in. Also you would have to factor in if Captcha cares if the case of the letters is different.

 

Edit: Under tools->Pick Bitmap on SCAR you can select a part of the screen and it will make it a bitmap

Edited by LordJashin
Link to comment
Share on other sites

Edit: Under tools->Pick Bitmap on SCAR you can select a part of the screen and it will make it a bitmap

 

I want to do it inside the script so I can get the bitmap of the captcha

 

I want a function like 'getcolor', but for a bitmap

Edited by arnerob
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...