Explorar el Código

* Decode Auditor captchas.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/pwntcha/trunk@401 92316355-f0b4-4df1-b90c-862c8a59935f
master
sam hace 21 años
padre
commit
dea689a955
Se han modificado 100 ficheros con 43 adiciones y 3 borrados
  1. +3
    -1
      src/main.c
  2. +40
    -2
      src/scode.c
  3. BIN
      testsuite/auditor/auditor00.png
  4. BIN
      testsuite/auditor/auditor01.png
  5. BIN
      testsuite/auditor/auditor02.png
  6. BIN
      testsuite/auditor/auditor03.png
  7. BIN
      testsuite/auditor/auditor04.png
  8. BIN
      testsuite/auditor/auditor05.png
  9. BIN
      testsuite/auditor/auditor06.png
  10. BIN
      testsuite/auditor/auditor07.png
  11. BIN
      testsuite/auditor/auditor08.png
  12. BIN
      testsuite/auditor/auditor09.png
  13. BIN
      testsuite/auditor/auditor10.png
  14. BIN
      testsuite/auditor/auditor11.png
  15. BIN
      testsuite/auditor/auditor12.png
  16. BIN
      testsuite/auditor/auditor13.png
  17. BIN
      testsuite/auditor/auditor14.png
  18. BIN
      testsuite/auditor/auditor15.png
  19. BIN
      testsuite/auditor/auditor16.png
  20. BIN
      testsuite/auditor/auditor17.png
  21. BIN
      testsuite/auditor/auditor18.png
  22. BIN
      testsuite/auditor/auditor19.png
  23. BIN
      testsuite/auditor/auditor20.png
  24. BIN
      testsuite/auditor/auditor21.png
  25. BIN
      testsuite/auditor/auditor22.png
  26. BIN
      testsuite/auditor/auditor23.png
  27. BIN
      testsuite/auditor/auditor24.png
  28. BIN
      testsuite/auditor/auditor25.png
  29. BIN
      testsuite/auditor/auditor26.png
  30. BIN
      testsuite/auditor/auditor27.png
  31. BIN
      testsuite/auditor/auditor28.png
  32. BIN
      testsuite/auditor/auditor29.png
  33. BIN
      testsuite/auditor/auditor30.png
  34. BIN
      testsuite/auditor/auditor31.png
  35. BIN
      testsuite/auditor/auditor32.png
  36. BIN
      testsuite/auditor/auditor33.png
  37. BIN
      testsuite/auditor/auditor34.png
  38. BIN
      testsuite/auditor/auditor35.png
  39. BIN
      testsuite/auditor/auditor36.png
  40. BIN
      testsuite/auditor/auditor37.png
  41. BIN
      testsuite/auditor/auditor38.png
  42. BIN
      testsuite/auditor/auditor39.png
  43. BIN
      testsuite/auditor/auditor40.png
  44. BIN
      testsuite/auditor/auditor41.png
  45. BIN
      testsuite/auditor/auditor42.png
  46. BIN
      testsuite/auditor/auditor43.png
  47. BIN
      testsuite/auditor/auditor44.png
  48. BIN
      testsuite/auditor/auditor45.png
  49. BIN
      testsuite/auditor/auditor46.png
  50. BIN
      testsuite/auditor/auditor47.png
  51. BIN
      testsuite/auditor/auditor48.png
  52. BIN
      testsuite/auditor/auditor49.png
  53. BIN
      testsuite/auditor/auditor50.png
  54. BIN
      testsuite/auditor/auditor51.png
  55. BIN
      testsuite/auditor/auditor52.png
  56. BIN
      testsuite/auditor/auditor53.png
  57. BIN
      testsuite/auditor/auditor54.png
  58. BIN
      testsuite/auditor/auditor55.png
  59. BIN
      testsuite/auditor/auditor56.png
  60. BIN
      testsuite/auditor/auditor57.png
  61. BIN
      testsuite/auditor/auditor58.png
  62. BIN
      testsuite/auditor/auditor59.png
  63. BIN
      testsuite/auditor/auditor60.png
  64. BIN
      testsuite/auditor/auditor61.png
  65. BIN
      testsuite/auditor/auditor62.png
  66. BIN
      testsuite/auditor/auditor63.png
  67. BIN
      testsuite/auditor/auditor64.png
  68. BIN
      testsuite/auditor/auditor65.png
  69. BIN
      testsuite/auditor/auditor66.png
  70. BIN
      testsuite/auditor/auditor67.png
  71. BIN
      testsuite/auditor/auditor68.png
  72. BIN
      testsuite/auditor/auditor69.png
  73. BIN
      testsuite/auditor/auditor70.png
  74. BIN
      testsuite/auditor/auditor71.png
  75. BIN
      testsuite/auditor/auditor72.png
  76. BIN
      testsuite/auditor/auditor73.png
  77. BIN
      testsuite/auditor/auditor74.png
  78. BIN
      testsuite/auditor/auditor75.png
  79. BIN
      testsuite/auditor/auditor76.png
  80. BIN
      testsuite/auditor/auditor77.png
  81. BIN
      testsuite/auditor/auditor78.png
  82. BIN
      testsuite/auditor/auditor79.png
  83. BIN
      testsuite/auditor/auditor80.png
  84. BIN
      testsuite/auditor/auditor81.png
  85. BIN
      testsuite/auditor/auditor82.png
  86. BIN
      testsuite/auditor/auditor83.png
  87. BIN
      testsuite/auditor/auditor84.png
  88. BIN
      testsuite/auditor/auditor85.png
  89. BIN
      testsuite/auditor/auditor86.png
  90. BIN
      testsuite/auditor/auditor87.png
  91. BIN
      testsuite/auditor/auditor88.png
  92. BIN
      testsuite/auditor/auditor89.png
  93. BIN
      testsuite/auditor/auditor90.png
  94. BIN
      testsuite/auditor/auditor91.png
  95. BIN
      testsuite/auditor/auditor92.png
  96. BIN
      testsuite/auditor/auditor93.png
  97. BIN
      testsuite/auditor/auditor94.png
  98. BIN
      testsuite/auditor/auditor95.png
  99. BIN
      testsuite/auditor/auditor96.png
  100. BIN
      testsuite/auditor/auditor97.png

+ 3
- 1
src/main.c Ver fichero

@@ -117,6 +117,8 @@ int main(int argc, char *argv[])
continue;
}

dprintf("image size %ix%i\n", img->width, img->height);

if(!strcmp(mode, "test"))
result = decode_test(img);
else if(!strcmp(mode, "phpbb"))
@@ -132,7 +134,7 @@ int main(int argc, char *argv[])
dprintf("autodetecting phpBB captcha\n");
result = decode_phpbb(img);
}
else if(img->height == 25)
else if(img->height == 25 || img->height == 30)
{
dprintf("autodetecting scode captcha\n");
result = decode_scode(img);


+ 40
- 2
src/scode.c Ver fichero

@@ -30,7 +30,7 @@ char *decode_scode(struct image *img)
/* allocate enough place */
result = malloc(1024 * sizeof(char));

/* Detect background: first 3 lines */
/* Detect background: first and last 3 lines */
for(i = 0; i < 256; i++)
stats[i] = 0;

@@ -39,6 +39,8 @@ char *decode_scode(struct image *img)
{
getpixel(img, x, y, &r, &g, &b);
stats[r]++;
getpixel(img, x, img->width - 1 - y, &r, &g, &b);
stats[r]++;
}

/* Set non-background colours to 0 */
@@ -120,12 +122,47 @@ static char find_glyph(struct image *img, int xmin, int xmax)
{
getpixel(img, x, y, &r, &g, &b);
if(!r)
count += y - ymin;
count += 5 * (y - ymin) ^ 3 * (x - xmin);
//count += y - ymin;
}
}

switch(count)
{
/* Scode font */
case 778: return '0';
case 621: return '1';
case 854: return '2';
case 784: return '3';
case 766: return '4';
case 771: return '5';
case 976: return '6';
case 585: return '7';
case 980: return '8';
case 896: return '9';
/* Small font */
case 584: return '0';
case 454: return '1';
case 517: return '2';
case 447: return '3';
case 469: return '4';
case 472: return '5';
case 564: return '6';
case 298: return '7';
case 560: return '8';
case 536: return '9';
/* Thin font */
case 438: return '0';
case 405: return '1';
case 485: return '2';
case 486: return '3';
case 413: return '4';
case 509: return '5';
case 582: return '6';
case 242: return '7';
case 579: return '8';
case 440: return '9';
#if 0
case 162: return '0';
case 131: return '1';
case 150: return '2';
@@ -136,6 +173,7 @@ static char find_glyph(struct image *img, int xmin, int xmax)
case 90: return '7';
case 180: return '8';
case 170: return '9';
#endif
default:
dprintf("don't know about checksum %i\n", count);
return '?';


BIN
testsuite/auditor/auditor00.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 478 B

BIN
testsuite/auditor/auditor01.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 485 B

BIN
testsuite/auditor/auditor02.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 504 B

BIN
testsuite/auditor/auditor03.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 473 B

BIN
testsuite/auditor/auditor04.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 540 B

BIN
testsuite/auditor/auditor05.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 473 B

BIN
testsuite/auditor/auditor06.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 480 B

BIN
testsuite/auditor/auditor07.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 509 B

BIN
testsuite/auditor/auditor08.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 505 B

BIN
testsuite/auditor/auditor09.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 464 B

BIN
testsuite/auditor/auditor10.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 507 B

BIN
testsuite/auditor/auditor11.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 458 B

BIN
testsuite/auditor/auditor12.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 490 B

BIN
testsuite/auditor/auditor13.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 455 B

BIN
testsuite/auditor/auditor14.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 521 B

BIN
testsuite/auditor/auditor15.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 464 B

BIN
testsuite/auditor/auditor16.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 483 B

BIN
testsuite/auditor/auditor17.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 482 B

BIN
testsuite/auditor/auditor18.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 448 B

BIN
testsuite/auditor/auditor19.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 522 B

BIN
testsuite/auditor/auditor20.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 478 B

BIN
testsuite/auditor/auditor21.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 479 B

BIN
testsuite/auditor/auditor22.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 511 B

BIN
testsuite/auditor/auditor23.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 502 B

BIN
testsuite/auditor/auditor24.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 511 B

BIN
testsuite/auditor/auditor25.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 513 B

BIN
testsuite/auditor/auditor26.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 495 B

BIN
testsuite/auditor/auditor27.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 485 B

BIN
testsuite/auditor/auditor28.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 517 B

BIN
testsuite/auditor/auditor29.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 477 B

BIN
testsuite/auditor/auditor30.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 512 B

BIN
testsuite/auditor/auditor31.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 512 B

BIN
testsuite/auditor/auditor32.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 477 B

BIN
testsuite/auditor/auditor33.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 464 B

BIN
testsuite/auditor/auditor34.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 482 B

BIN
testsuite/auditor/auditor35.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 500 B

BIN
testsuite/auditor/auditor36.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 472 B

BIN
testsuite/auditor/auditor37.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 496 B

BIN
testsuite/auditor/auditor38.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 468 B

BIN
testsuite/auditor/auditor39.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 493 B

BIN
testsuite/auditor/auditor40.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 480 B

BIN
testsuite/auditor/auditor41.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 518 B

BIN
testsuite/auditor/auditor42.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 518 B

BIN
testsuite/auditor/auditor43.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 458 B

BIN
testsuite/auditor/auditor44.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 529 B

BIN
testsuite/auditor/auditor45.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 452 B

BIN
testsuite/auditor/auditor46.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 445 B

BIN
testsuite/auditor/auditor47.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 447 B

BIN
testsuite/auditor/auditor48.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 487 B

BIN
testsuite/auditor/auditor49.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 489 B

BIN
testsuite/auditor/auditor50.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 514 B

BIN
testsuite/auditor/auditor51.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 516 B

BIN
testsuite/auditor/auditor52.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 499 B

BIN
testsuite/auditor/auditor53.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 438 B

BIN
testsuite/auditor/auditor54.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 480 B

BIN
testsuite/auditor/auditor55.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 474 B

BIN
testsuite/auditor/auditor56.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 470 B

BIN
testsuite/auditor/auditor57.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 506 B

BIN
testsuite/auditor/auditor58.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 486 B

BIN
testsuite/auditor/auditor59.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 457 B

BIN
testsuite/auditor/auditor60.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 497 B

BIN
testsuite/auditor/auditor61.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 538 B

BIN
testsuite/auditor/auditor62.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 510 B

BIN
testsuite/auditor/auditor63.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 499 B

BIN
testsuite/auditor/auditor64.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 518 B

BIN
testsuite/auditor/auditor65.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 514 B

BIN
testsuite/auditor/auditor66.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 487 B

BIN
testsuite/auditor/auditor67.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 483 B

BIN
testsuite/auditor/auditor68.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 476 B

BIN
testsuite/auditor/auditor69.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 478 B

BIN
testsuite/auditor/auditor70.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 499 B

BIN
testsuite/auditor/auditor71.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 521 B

BIN
testsuite/auditor/auditor72.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 497 B

BIN
testsuite/auditor/auditor73.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 476 B

BIN
testsuite/auditor/auditor74.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 449 B

BIN
testsuite/auditor/auditor75.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 536 B

BIN
testsuite/auditor/auditor76.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 464 B

BIN
testsuite/auditor/auditor77.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 490 B

BIN
testsuite/auditor/auditor78.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 505 B

BIN
testsuite/auditor/auditor79.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 488 B

BIN
testsuite/auditor/auditor80.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 495 B

BIN
testsuite/auditor/auditor81.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 513 B

BIN
testsuite/auditor/auditor82.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 473 B

BIN
testsuite/auditor/auditor83.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 501 B

BIN
testsuite/auditor/auditor84.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 501 B

BIN
testsuite/auditor/auditor85.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 480 B

BIN
testsuite/auditor/auditor86.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 528 B

BIN
testsuite/auditor/auditor87.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 542 B

BIN
testsuite/auditor/auditor88.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 482 B

BIN
testsuite/auditor/auditor89.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 482 B

BIN
testsuite/auditor/auditor90.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 464 B

BIN
testsuite/auditor/auditor91.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 507 B

BIN
testsuite/auditor/auditor92.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 473 B

BIN
testsuite/auditor/auditor93.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 499 B

BIN
testsuite/auditor/auditor94.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 466 B

BIN
testsuite/auditor/auditor95.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 467 B

BIN
testsuite/auditor/auditor96.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 483 B

BIN
testsuite/auditor/auditor97.png Ver fichero

Antes Después
Anchura: 120  |  Altura: 30  |  Tamaño: 496 B

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio

Cargando…
Cancelar
Guardar