* minor cosmetic fix. git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/pwntcha/trunk@408 92316355-f0b4-4df1-b90c-862c8a59935fmaster
@@ -134,18 +134,18 @@ int main(int argc, char *argv[]) | |||||
{ | { | ||||
if(img->width == 320 && img->height == 50) | if(img->width == 320 && img->height == 50) | ||||
{ | { | ||||
dprintf("autodetecting phpBB captcha\n"); | |||||
dprintf("autodetected phpBB captcha\n"); | |||||
result = decode_phpbb(img); | result = decode_phpbb(img); | ||||
} | } | ||||
else if((img->height == 25 || img->height == 30) | else if((img->height == 25 || img->height == 30) | ||||
&& count < 10) | && count < 10) | ||||
{ | { | ||||
dprintf("autodetecting scode captcha\n"); | |||||
dprintf("autodetected scode captcha\n"); | |||||
result = decode_scode(img); | result = decode_scode(img); | ||||
} | } | ||||
else if(img->height == 69) | else if(img->height == 69) | ||||
{ | { | ||||
dprintf("autodetecting slashdot captcha\n"); | |||||
dprintf("autodetected slashdot captcha\n"); | |||||
result = decode_slashdot(img); | result = decode_slashdot(img); | ||||
} | } | ||||
else | else | ||||
@@ -37,6 +37,7 @@ char *decode_phpbb(struct image *img) | |||||
/* phpBB captchas have 6 characters */ | /* phpBB captchas have 6 characters */ | ||||
result = malloc(7 * sizeof(char)); | result = malloc(7 * sizeof(char)); | ||||
strcpy(result, " "); | |||||
if(!font) | if(!font) | ||||
{ | { | ||||
@@ -58,8 +59,6 @@ char *decode_phpbb(struct image *img) | |||||
setpixel(tmp3, x, y, 255, g, 255); | setpixel(tmp3, x, y, 255, g, 255); | ||||
} | } | ||||
strcpy(result, " "); | |||||
for(cur = 0; cur < 6; cur++) | for(cur = 0; cur < 6; cur++) | ||||
{ | { | ||||
/* Try to find 1st letter */ | /* Try to find 1st letter */ | ||||
@@ -45,6 +45,7 @@ char *decode_slashdot(struct image *img) | |||||
/* Slashdot captchas have 7 characters */ | /* Slashdot captchas have 7 characters */ | ||||
result = malloc(8 * sizeof(char)); | result = malloc(8 * sizeof(char)); | ||||
strcpy(result, " "); | |||||
/* Clean image a bit */ | /* Clean image a bit */ | ||||
tmp1 = filter_detect_lines(img); | tmp1 = filter_detect_lines(img); | ||||
@@ -256,8 +257,6 @@ static struct image *find_glyphs(struct image *img) | |||||
setpixel(dst, x, y, 255, g, 255); | setpixel(dst, x, y, 255, g, 255); | ||||
} | } | ||||
strcpy(result, " "); | |||||
for(x = 0; x < font->width; x++) | for(x = 0; x < font->width; x++) | ||||
{ | { | ||||
int found = 0; | int found = 0; | ||||