SRL Archive - General

captcha


MylesMadness

2009-07-04 01:35:02

I was trying to break this captcha and I got this, anyone want to help me get farther?
program New;
var
b: TBitmap;
w, h, i: Integer;
p: TPointArray;

Procedure RemoveTPointFromArray(Index:Integer; Var Arr:TPointArray);
begin
tSwap(Arr[Index], Arr[High(Arr)]);
SetArrayLength(Arr, High(Arr));
end;

Procedure FilterPoints(var p:TPointArray; II, III:Integer);
var
I, x, y, c:Integer;
begin
For I:=0 to high(P)do
begin
C:=0;
for x:= 0 to II do
for y:= 0 to II do
if getcolor(p[I].x-x, p[I].y-y) <> 0 then
Inc(C);
If C > III then
RemoveTPointFromArray(I, P);
end;
end;

begin
b := LoadBitmap('C:\tmp.jpeg');
GetBitmapSize(b, w, h);

SetTargetBitmap(b);
FindColorsTolerance(p, clwhite, 0, 0, w, h, 0);
for i := 0 to High(p) do
FastSetPixel(b, p[i].x, p[i].y, clblack);
FindColorsTolerance(p, clwhite, 0, 0, w, h, 441);
FilterPoints(P, 1, 3);

for i := 0 to High(p) do
FastSetPixel(b, p[i].x, p[i].y, clblack);

FindColorsTolerance(p, clwhite, 0, 0, w, h, 441);
for i := 0 to High(p) do
FastSetPixel(b, p[i].x, p[i].y, clred);

DisplayDebugImgWindow(w, h);
SafeDrawBitmap(b, GetDebugCanvas, 0, 0);

FreeBitmap(b);
end.

MylesMadness

2009-07-07 03:26:17

So no one cares, double post
program New;
var
b: TBitmap;
w, h, i: Integer;
p: TPointArray;

Procedure RemoveTPointFromArray(Index:Integer; Var Arr:TPointArray);
begin
tSwap(Arr[Index], Arr[High(Arr)]);
SetArrayLength(Arr, High(Arr));
end;

Procedure FilterPoints(var p:TPointArray; Color, II, III:Integer);
var
I, x, y, c:Integer;
//TPA:TPointArray;
begin
//TPA:=P;
For I:=0 to high(P)do
begin
C:=0;
for x:= 0 to II do
for y:= 0 to II do
if getcolor(p[i].x-x, p[i].y-y) <> Color then
Inc(C);
If C > III then
RemoveTPointFromArray(I, {TPA}P);
end;
//P:=TPA;
end;

begin
b := LoadBitmap('C:\tmp.jpeg');
GetBitmapSize(b, w, h);

SetTargetBitmap(b);
FindColorsTolerance(p, clwhite, 0, 0, w, h, 0);
for i := 0 to High(p) do
FastSetPixel(b, p[i].x, p[i].y, clblack);
FindColorsTolerance(p, clwhite, 0, 0, w, h, 441);
for i := 0 to High(p) do
FastSetPixel(b, p[i].x, p[i].y, Clwhite);

FindColorsTolerance(p, clwhite, 0, 0, w, h, 441);
FilterPoints(P, 0, 1, 3);
for i := 0 to High(p) do
FastSetPixel(b, p[i].x, p[i].y, clBlack);

DisplayDebugImgWindow(w, h);
SafeDrawBitmap(b, GetDebugCanvas, 0, 0);

FreeBitmap(b);
end.

Blender

2009-07-08 06:07:17

Lol, I wouldn't consider it that hard to break.

You just need to make a right triangle against one of the letters, to figure out the slant of the code.

Then you just make SCAR shift the pixels to the left or right to make the code upright.

From there, it's just a piece of cake.

Da 0wner

2009-07-08 06:10:58

From: xXxBlender3DxXx
Lol, I wouldn't consider it that hard to break.

You just need to make a right triangle against one of the letters, to figure out the slant of the code.

Then you just make SCAR shift the pixels to the left or right to make the code upright.

From there, it's just a piece of cake.


Using some leet trig?

Blender

2009-07-08 07:14:24

Trig ownage!

So, do you any help?

Da 0wner

2009-07-08 07:17:12

I don't think rotating it is even needed..

Gu3st...

2009-07-08 16:05:48

Search for pixel group smaller than 3 pixels (in a 9x9 square) and take those out. That will remove lots of noise