Procházet zdrojové kódy

* Decode Auditor captchas.

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

+ 3
- 1
src/main.c Zobrazit soubor

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

@@ -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ární
testsuite/auditor/auditor00.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 478 B

binární
testsuite/auditor/auditor01.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 485 B

binární
testsuite/auditor/auditor02.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 504 B

binární
testsuite/auditor/auditor03.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 473 B

binární
testsuite/auditor/auditor04.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 540 B

binární
testsuite/auditor/auditor05.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 473 B

binární
testsuite/auditor/auditor06.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 480 B

binární
testsuite/auditor/auditor07.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 509 B

binární
testsuite/auditor/auditor08.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 505 B

binární
testsuite/auditor/auditor09.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 464 B

binární
testsuite/auditor/auditor10.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 507 B

binární
testsuite/auditor/auditor11.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 458 B

binární
testsuite/auditor/auditor12.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 490 B

binární
testsuite/auditor/auditor13.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 455 B

binární
testsuite/auditor/auditor14.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 521 B

binární
testsuite/auditor/auditor15.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 464 B

binární
testsuite/auditor/auditor16.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 483 B

binární
testsuite/auditor/auditor17.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 482 B

binární
testsuite/auditor/auditor18.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 448 B

binární
testsuite/auditor/auditor19.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 522 B

binární
testsuite/auditor/auditor20.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 478 B

binární
testsuite/auditor/auditor21.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 479 B

binární
testsuite/auditor/auditor22.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 511 B

binární
testsuite/auditor/auditor23.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 502 B

binární
testsuite/auditor/auditor24.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 511 B

binární
testsuite/auditor/auditor25.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 513 B

binární
testsuite/auditor/auditor26.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 495 B

binární
testsuite/auditor/auditor27.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 485 B

binární
testsuite/auditor/auditor28.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 517 B

binární
testsuite/auditor/auditor29.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 477 B

binární
testsuite/auditor/auditor30.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 512 B

binární
testsuite/auditor/auditor31.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 512 B

binární
testsuite/auditor/auditor32.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 477 B

binární
testsuite/auditor/auditor33.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 464 B

binární
testsuite/auditor/auditor34.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 482 B

binární
testsuite/auditor/auditor35.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 500 B

binární
testsuite/auditor/auditor36.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 472 B

binární
testsuite/auditor/auditor37.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 496 B

binární
testsuite/auditor/auditor38.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 468 B

binární
testsuite/auditor/auditor39.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 493 B

binární
testsuite/auditor/auditor40.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 480 B

binární
testsuite/auditor/auditor41.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 518 B

binární
testsuite/auditor/auditor42.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 518 B

binární
testsuite/auditor/auditor43.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 458 B

binární
testsuite/auditor/auditor44.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 529 B

binární
testsuite/auditor/auditor45.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 452 B

binární
testsuite/auditor/auditor46.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 445 B

binární
testsuite/auditor/auditor47.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 447 B

binární
testsuite/auditor/auditor48.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 487 B

binární
testsuite/auditor/auditor49.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 489 B

binární
testsuite/auditor/auditor50.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 514 B

binární
testsuite/auditor/auditor51.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 516 B

binární
testsuite/auditor/auditor52.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 499 B

binární
testsuite/auditor/auditor53.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 438 B

binární
testsuite/auditor/auditor54.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 480 B

binární
testsuite/auditor/auditor55.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 474 B

binární
testsuite/auditor/auditor56.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 470 B

binární
testsuite/auditor/auditor57.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 506 B

binární
testsuite/auditor/auditor58.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 486 B

binární
testsuite/auditor/auditor59.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 457 B

binární
testsuite/auditor/auditor60.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 497 B

binární
testsuite/auditor/auditor61.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 538 B

binární
testsuite/auditor/auditor62.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 510 B

binární
testsuite/auditor/auditor63.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 499 B

binární
testsuite/auditor/auditor64.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 518 B

binární
testsuite/auditor/auditor65.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 514 B

binární
testsuite/auditor/auditor66.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 487 B

binární
testsuite/auditor/auditor67.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 483 B

binární
testsuite/auditor/auditor68.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 476 B

binární
testsuite/auditor/auditor69.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 478 B

binární
testsuite/auditor/auditor70.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 499 B

binární
testsuite/auditor/auditor71.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 521 B

binární
testsuite/auditor/auditor72.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 497 B

binární
testsuite/auditor/auditor73.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 476 B

binární
testsuite/auditor/auditor74.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 449 B

binární
testsuite/auditor/auditor75.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 536 B

binární
testsuite/auditor/auditor76.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 464 B

binární
testsuite/auditor/auditor77.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 490 B

binární
testsuite/auditor/auditor78.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 505 B

binární
testsuite/auditor/auditor79.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 488 B

binární
testsuite/auditor/auditor80.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 495 B

binární
testsuite/auditor/auditor81.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 513 B

binární
testsuite/auditor/auditor82.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 473 B

binární
testsuite/auditor/auditor83.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 501 B

binární
testsuite/auditor/auditor84.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 501 B

binární
testsuite/auditor/auditor85.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 480 B

binární
testsuite/auditor/auditor86.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 528 B

binární
testsuite/auditor/auditor87.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 542 B

binární
testsuite/auditor/auditor88.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 482 B

binární
testsuite/auditor/auditor89.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 482 B

binární
testsuite/auditor/auditor90.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 464 B

binární
testsuite/auditor/auditor91.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 507 B

binární
testsuite/auditor/auditor92.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 473 B

binární
testsuite/auditor/auditor93.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 499 B

binární
testsuite/auditor/auditor94.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 466 B

binární
testsuite/auditor/auditor95.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 467 B

binární
testsuite/auditor/auditor96.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 483 B

binární
testsuite/auditor/auditor97.png Zobrazit soubor

Před Za
Šířka: 120  |  Výška: 30  |  Velikost: 496 B

Některé soubory nejsou zobrazny, neboť je v této revizi změněno mnoho souborů

Načítá se…
Zrušit
Uložit