ソースを参照

* Decode Auditor captchas.

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

+ 3
- 1
src/main.c ファイルの表示

@@ -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 ファイルの表示

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


バイナリ
testsuite/auditor/auditor00.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 478 B

バイナリ
testsuite/auditor/auditor01.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 485 B

バイナリ
testsuite/auditor/auditor02.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 504 B

バイナリ
testsuite/auditor/auditor03.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 473 B

バイナリ
testsuite/auditor/auditor04.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 540 B

バイナリ
testsuite/auditor/auditor05.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 473 B

バイナリ
testsuite/auditor/auditor06.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 480 B

バイナリ
testsuite/auditor/auditor07.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 509 B

バイナリ
testsuite/auditor/auditor08.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 505 B

バイナリ
testsuite/auditor/auditor09.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 464 B

バイナリ
testsuite/auditor/auditor10.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 507 B

バイナリ
testsuite/auditor/auditor11.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 458 B

バイナリ
testsuite/auditor/auditor12.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 490 B

バイナリ
testsuite/auditor/auditor13.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 455 B

バイナリ
testsuite/auditor/auditor14.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 521 B

バイナリ
testsuite/auditor/auditor15.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 464 B

バイナリ
testsuite/auditor/auditor16.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 483 B

バイナリ
testsuite/auditor/auditor17.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 482 B

バイナリ
testsuite/auditor/auditor18.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 448 B

バイナリ
testsuite/auditor/auditor19.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 522 B

バイナリ
testsuite/auditor/auditor20.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 478 B

バイナリ
testsuite/auditor/auditor21.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 479 B

バイナリ
testsuite/auditor/auditor22.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 511 B

バイナリ
testsuite/auditor/auditor23.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 502 B

バイナリ
testsuite/auditor/auditor24.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 511 B

バイナリ
testsuite/auditor/auditor25.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 513 B

バイナリ
testsuite/auditor/auditor26.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 495 B

バイナリ
testsuite/auditor/auditor27.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 485 B

バイナリ
testsuite/auditor/auditor28.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 517 B

バイナリ
testsuite/auditor/auditor29.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 477 B

バイナリ
testsuite/auditor/auditor30.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 512 B

バイナリ
testsuite/auditor/auditor31.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 512 B

バイナリ
testsuite/auditor/auditor32.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 477 B

バイナリ
testsuite/auditor/auditor33.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 464 B

バイナリ
testsuite/auditor/auditor34.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 482 B

バイナリ
testsuite/auditor/auditor35.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 500 B

バイナリ
testsuite/auditor/auditor36.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 472 B

バイナリ
testsuite/auditor/auditor37.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 496 B

バイナリ
testsuite/auditor/auditor38.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 468 B

バイナリ
testsuite/auditor/auditor39.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 493 B

バイナリ
testsuite/auditor/auditor40.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 480 B

バイナリ
testsuite/auditor/auditor41.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 518 B

バイナリ
testsuite/auditor/auditor42.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 518 B

バイナリ
testsuite/auditor/auditor43.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 458 B

バイナリ
testsuite/auditor/auditor44.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 529 B

バイナリ
testsuite/auditor/auditor45.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 452 B

バイナリ
testsuite/auditor/auditor46.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 445 B

バイナリ
testsuite/auditor/auditor47.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 447 B

バイナリ
testsuite/auditor/auditor48.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 487 B

バイナリ
testsuite/auditor/auditor49.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 489 B

バイナリ
testsuite/auditor/auditor50.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 514 B

バイナリ
testsuite/auditor/auditor51.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 516 B

バイナリ
testsuite/auditor/auditor52.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 499 B

バイナリ
testsuite/auditor/auditor53.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 438 B

バイナリ
testsuite/auditor/auditor54.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 480 B

バイナリ
testsuite/auditor/auditor55.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 474 B

バイナリ
testsuite/auditor/auditor56.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 470 B

バイナリ
testsuite/auditor/auditor57.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 506 B

バイナリ
testsuite/auditor/auditor58.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 486 B

バイナリ
testsuite/auditor/auditor59.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 457 B

バイナリ
testsuite/auditor/auditor60.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 497 B

バイナリ
testsuite/auditor/auditor61.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 538 B

バイナリ
testsuite/auditor/auditor62.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 510 B

バイナリ
testsuite/auditor/auditor63.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 499 B

バイナリ
testsuite/auditor/auditor64.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 518 B

バイナリ
testsuite/auditor/auditor65.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 514 B

バイナリ
testsuite/auditor/auditor66.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 487 B

バイナリ
testsuite/auditor/auditor67.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 483 B

バイナリ
testsuite/auditor/auditor68.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 476 B

バイナリ
testsuite/auditor/auditor69.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 478 B

バイナリ
testsuite/auditor/auditor70.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 499 B

バイナリ
testsuite/auditor/auditor71.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 521 B

バイナリ
testsuite/auditor/auditor72.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 497 B

バイナリ
testsuite/auditor/auditor73.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 476 B

バイナリ
testsuite/auditor/auditor74.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 449 B

バイナリ
testsuite/auditor/auditor75.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 536 B

バイナリ
testsuite/auditor/auditor76.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 464 B

バイナリ
testsuite/auditor/auditor77.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 490 B

バイナリ
testsuite/auditor/auditor78.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 505 B

バイナリ
testsuite/auditor/auditor79.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 488 B

バイナリ
testsuite/auditor/auditor80.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 495 B

バイナリ
testsuite/auditor/auditor81.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 513 B

バイナリ
testsuite/auditor/auditor82.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 473 B

バイナリ
testsuite/auditor/auditor83.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 501 B

バイナリ
testsuite/auditor/auditor84.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 501 B

バイナリ
testsuite/auditor/auditor85.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 480 B

バイナリ
testsuite/auditor/auditor86.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 528 B

バイナリ
testsuite/auditor/auditor87.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 542 B

バイナリ
testsuite/auditor/auditor88.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 482 B

バイナリ
testsuite/auditor/auditor89.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 482 B

バイナリ
testsuite/auditor/auditor90.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 464 B

バイナリ
testsuite/auditor/auditor91.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 507 B

バイナリ
testsuite/auditor/auditor92.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 473 B

バイナリ
testsuite/auditor/auditor93.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 499 B

バイナリ
testsuite/auditor/auditor94.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 466 B

バイナリ
testsuite/auditor/auditor95.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 467 B

バイナリ
testsuite/auditor/auditor96.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 483 B

バイナリ
testsuite/auditor/auditor97.png ファイルの表示

変更前 変更後
幅: 120  |  高さ: 30  |  サイズ: 496 B

変更されたファイルが多すぎるため、一部のファイルは表示されません

読み込み中…
キャンセル
保存