Explorar el Código

* s/autodetecting/autodetected/

* minor cosmetic fix.


git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/pwntcha/trunk@408 92316355-f0b4-4df1-b90c-862c8a59935f
master
sam hace 20 años
padre
commit
98f1af353e
Se han modificado 3 ficheros con 5 adiciones y 7 borrados
  1. +3
    -3
      src/main.c
  2. +1
    -2
      src/phpbb.c
  3. +1
    -2
      src/slashdot.c

+ 3
- 3
src/main.c Ver fichero

@@ -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


+ 1
- 2
src/phpbb.c Ver fichero

@@ -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 */


+ 1
- 2
src/slashdot.c Ver fichero

@@ -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;


Cargando…
Cancelar
Guardar