Changeset 424 for pwntcha


Ignore:
Timestamp:
Jan 5, 2005, 6:08:50 PM (15 years ago)
Author:
Sam Hocevar
Message:
  • authimage support
  • broadened scode to trencaspammers
Location:
pwntcha/trunk
Files:
104 added
7 edited

Legend:

Unmodified
Added
Removed
  • pwntcha/trunk/src/Makefile.am

    r419 r424  
    99    filters.c \
    1010    common.h \
     11    authimage.c \
    1112    linuxfr.c \
    1213    phpbb.c \
  • pwntcha/trunk/src/common.h

    r419 r424  
    2222
    2323/* available CAPTCHA decoders */
     24char *decode_authimage(struct image *img);
    2425char *decode_linuxfr(struct image *img);
    2526char *decode_phpbb(struct image *img);
     
    4344struct image *filter_fill_holes(struct image *img);
    4445struct image *filter_dup(struct image *img);
     46struct image *filter_scale(struct image *img, float ratio);
    4547struct image *filter_black_stuff(struct image *img);
    4648struct image *filter_detect_lines(struct image *img);
  • pwntcha/trunk/src/filters.c

    r417 r424  
    6565        {
    6666            getpixel(img, x, y, &r, &g, &b);
     67            setpixel(dst, x, y, r, g, b);
     68        }
     69
     70    return dst;
     71}
     72
     73struct image *filter_scale(struct image *img, float ratio)
     74{
     75    struct image *dst;
     76    int w, h, x, y;
     77    int r, g, b;
     78
     79    w = ratio * img->width;
     80    h = ratio * img->height;
     81
     82    dst = image_new(w, h);
     83
     84    for(y = 0; y < h; y++)
     85        for(x = 0; x < w; x++)
     86        {
     87            getpixel(img, x / ratio, y / ratio, &r, &g, &b);
    6788            setpixel(dst, x, y, r, g, b);
    6889        }
  • pwntcha/trunk/src/linuxfr.c

    r421 r424  
    3030    struct image *tmp;
    3131    int x, y, r, g, b, i, j, c;
    32     int stats[40];
     32    int *stats = malloc(img->height * sizeof(int));
    3333
    3434    if(!font)
     
    146146
    147147    image_free(tmp);
     148    free(stats);
    148149
    149150    if(strlen(result) != 7)
  • pwntcha/trunk/src/main.c

    r419 r424  
    125125        if(!strcmp(mode, "test"))
    126126            result = decode_test(img);
     127        else if(!strcmp(mode, "authimage"))
     128            result = decode_authimage(img);
    127129        else if(!strcmp(mode, "linuxfr"))
    128130            result = decode_linuxfr(img);
     
    137139        else
    138140        {
    139             if(img->width == 100 && img->height == 40)
     141            if(img->width == 155 && img->height == 50)
     142            {
     143                dprintf("autodetected authimage captcha\n");
     144                result = decode_authimage(img);
     145            }
     146            else if(img->width == 100 && img->height == 40 && count < 6)
    140147            {
    141148                dprintf("autodetected linuxfr captcha\n");
     
    147154                result = decode_phpbb(img);
    148155            }
    149             else if((img->height == 25 || img->height == 30)
    150                      && count < 10)
    151             {
    152                 dprintf("autodetected scode captcha\n");
     156            else if(img->height <= 40 && count < 10)
     157            {
     158                dprintf("autodetected scode/trencaspammers captcha\n");
    153159                result = decode_scode(img);
    154160            }
  • pwntcha/trunk/testsuite/Makefile.am

    r422 r424  
    44    README \
    55    auditor/auditor00.png auditor/auditor01.png auditor/auditor02.png auditor/auditor03.png auditor/auditor04.png auditor/auditor05.png auditor/auditor06.png auditor/auditor07.png auditor/auditor08.png auditor/auditor09.png auditor/auditor10.png auditor/auditor11.png auditor/auditor12.png auditor/auditor13.png auditor/auditor14.png auditor/auditor15.png auditor/auditor16.png auditor/auditor17.png auditor/auditor18.png auditor/auditor19.png auditor/auditor20.png auditor/auditor21.png auditor/auditor22.png auditor/auditor23.png auditor/auditor24.png auditor/auditor25.png auditor/auditor26.png auditor/auditor27.png auditor/auditor28.png auditor/auditor29.png auditor/auditor30.png auditor/auditor31.png auditor/auditor32.png auditor/auditor33.png auditor/auditor34.png auditor/auditor35.png auditor/auditor36.png auditor/auditor37.png auditor/auditor38.png auditor/auditor39.png auditor/auditor40.png auditor/auditor41.png auditor/auditor42.png auditor/auditor43.png auditor/auditor44.png auditor/auditor45.png auditor/auditor46.png auditor/auditor47.png auditor/auditor48.png auditor/auditor49.png auditor/auditor50.png auditor/auditor51.png auditor/auditor52.png auditor/auditor53.png auditor/auditor54.png auditor/auditor55.png auditor/auditor56.png auditor/auditor57.png auditor/auditor58.png auditor/auditor59.png auditor/auditor60.png auditor/auditor61.png auditor/auditor62.png auditor/auditor63.png auditor/auditor64.png auditor/auditor65.png auditor/auditor66.png auditor/auditor67.png auditor/auditor68.png auditor/auditor69.png auditor/auditor70.png auditor/auditor71.png auditor/auditor72.png auditor/auditor73.png auditor/auditor74.png auditor/auditor75.png auditor/auditor76.png auditor/auditor77.png auditor/auditor78.png auditor/auditor79.png auditor/auditor80.png auditor/auditor81.png auditor/auditor82.png auditor/auditor83.png auditor/auditor84.png auditor/auditor85.png auditor/auditor86.png auditor/auditor87.png auditor/auditor88.png auditor/auditor89.png auditor/auditor90.png auditor/auditor91.png auditor/auditor92.png auditor/auditor93.png auditor/auditor94.png auditor/auditor95.png auditor/auditor96.png auditor/auditor97.png auditor/auditor98.png auditor/auditor99.png auditor/control.txt \
     6    authimage/authimage00.jpeg authimage/authimage01.jpeg authimage/authimage02.jpeg authimage/authimage03.jpeg authimage/authimage04.jpeg authimage/authimage05.jpeg authimage/authimage06.jpeg authimage/authimage07.jpeg authimage/authimage08.jpeg authimage/authimage09.jpeg authimage/authimage10.jpeg authimage/authimage11.jpeg authimage/authimage12.jpeg authimage/authimage13.jpeg authimage/authimage14.jpeg authimage/authimage15.jpeg authimage/authimage16.jpeg authimage/authimage17.jpeg authimage/authimage18.jpeg authimage/authimage19.jpeg authimage/authimage20.jpeg authimage/authimage21.jpeg authimage/authimage22.jpeg authimage/authimage23.jpeg authimage/authimage24.jpeg authimage/authimage25.jpeg authimage/authimage26.jpeg authimage/authimage27.jpeg authimage/authimage28.jpeg authimage/authimage29.jpeg authimage/authimage30.jpeg authimage/authimage31.jpeg authimage/authimage32.jpeg authimage/authimage33.jpeg authimage/authimage34.jpeg authimage/authimage35.jpeg authimage/authimage36.jpeg authimage/authimage37.jpeg authimage/authimage38.jpeg authimage/authimage39.jpeg authimage/authimage40.jpeg authimage/authimage41.jpeg authimage/authimage42.jpeg authimage/authimage43.jpeg authimage/authimage44.jpeg authimage/authimage45.jpeg authimage/authimage46.jpeg authimage/authimage47.jpeg authimage/authimage48.jpeg authimage/authimage49.jpeg authimage/authimage50.jpeg authimage/authimage51.jpeg authimage/authimage52.jpeg authimage/authimage53.jpeg authimage/authimage54.jpeg authimage/authimage55.jpeg authimage/authimage56.jpeg authimage/authimage57.jpeg authimage/authimage58.jpeg authimage/authimage59.jpeg authimage/authimage60.jpeg authimage/authimage61.jpeg authimage/authimage62.jpeg authimage/authimage63.jpeg authimage/authimage64.jpeg authimage/authimage65.jpeg authimage/authimage66.jpeg authimage/authimage67.jpeg authimage/authimage68.jpeg authimage/authimage69.jpeg authimage/authimage70.jpeg authimage/authimage71.jpeg authimage/authimage72.jpeg authimage/authimage73.jpeg authimage/authimage74.jpeg authimage/authimage75.jpeg authimage/authimage76.jpeg authimage/authimage77.jpeg authimage/authimage78.jpeg authimage/authimage79.jpeg authimage/authimage80.jpeg authimage/authimage81.jpeg authimage/authimage82.jpeg authimage/authimage83.jpeg authimage/authimage84.jpeg authimage/authimage85.jpeg authimage/authimage86.jpeg authimage/authimage87.jpeg authimage/authimage88.jpeg authimage/authimage89.jpeg authimage/authimage90.jpeg authimage/authimage91.jpeg authimage/authimage92.jpeg authimage/authimage93.jpeg authimage/authimage94.jpeg authimage/authimage95.jpeg authimage/authimage96.jpeg authimage/authimage97.jpeg authimage/authimage98.jpeg authimage/authimage99.jpeg authimage/control.txt \
    67    cfxcaptcha/cvxcaptcha00.jpeg cfxcaptcha/cvxcaptcha01.jpeg cfxcaptcha/cvxcaptcha02.jpeg cfxcaptcha/cvxcaptcha03.jpeg cfxcaptcha/cvxcaptcha04.jpeg cfxcaptcha/cvxcaptcha05.jpeg cfxcaptcha/cvxcaptcha06.jpeg cfxcaptcha/cvxcaptcha07.jpeg cfxcaptcha/cvxcaptcha08.jpeg cfxcaptcha/cvxcaptcha09.jpeg cfxcaptcha/cvxcaptcha10.jpeg cfxcaptcha/cvxcaptcha11.jpeg cfxcaptcha/cvxcaptcha12.jpeg cfxcaptcha/cvxcaptcha13.jpeg cfxcaptcha/cvxcaptcha14.jpeg cfxcaptcha/cvxcaptcha15.jpeg cfxcaptcha/cvxcaptcha16.jpeg cfxcaptcha/cvxcaptcha17.jpeg cfxcaptcha/cvxcaptcha18.jpeg cfxcaptcha/cvxcaptcha19.jpeg cfxcaptcha/cvxcaptcha20.jpeg cfxcaptcha/cvxcaptcha21.jpeg cfxcaptcha/cvxcaptcha22.jpeg cfxcaptcha/cvxcaptcha23.jpeg cfxcaptcha/cvxcaptcha24.jpeg cfxcaptcha/cvxcaptcha25.jpeg cfxcaptcha/cvxcaptcha26.jpeg cfxcaptcha/cvxcaptcha27.jpeg cfxcaptcha/cvxcaptcha28.jpeg cfxcaptcha/cvxcaptcha29.jpeg cfxcaptcha/cvxcaptcha30.jpeg cfxcaptcha/cvxcaptcha31.jpeg cfxcaptcha/cvxcaptcha32.jpeg cfxcaptcha/cvxcaptcha33.jpeg cfxcaptcha/cvxcaptcha34.jpeg cfxcaptcha/cvxcaptcha35.jpeg cfxcaptcha/cvxcaptcha36.jpeg cfxcaptcha/cvxcaptcha37.jpeg cfxcaptcha/cvxcaptcha38.jpeg cfxcaptcha/cvxcaptcha39.jpeg cfxcaptcha/cvxcaptcha40.jpeg cfxcaptcha/cvxcaptcha41.jpeg cfxcaptcha/cvxcaptcha42.jpeg cfxcaptcha/cvxcaptcha43.jpeg cfxcaptcha/cvxcaptcha44.jpeg cfxcaptcha/cvxcaptcha45.jpeg cfxcaptcha/cvxcaptcha46.jpeg cfxcaptcha/cvxcaptcha47.jpeg cfxcaptcha/cvxcaptcha48.jpeg cfxcaptcha/cvxcaptcha49.jpeg cfxcaptcha/cvxcaptcha50.jpeg cfxcaptcha/cvxcaptcha51.jpeg cfxcaptcha/cvxcaptcha52.jpeg cfxcaptcha/cvxcaptcha53.jpeg cfxcaptcha/cvxcaptcha54.jpeg cfxcaptcha/cvxcaptcha55.jpeg cfxcaptcha/cvxcaptcha56.jpeg cfxcaptcha/cvxcaptcha57.jpeg cfxcaptcha/cvxcaptcha58.jpeg cfxcaptcha/cvxcaptcha59.jpeg cfxcaptcha/cvxcaptcha60.jpeg cfxcaptcha/cvxcaptcha61.jpeg cfxcaptcha/cvxcaptcha62.jpeg cfxcaptcha/cvxcaptcha63.jpeg cfxcaptcha/cvxcaptcha64.jpeg cfxcaptcha/cvxcaptcha65.jpeg cfxcaptcha/cvxcaptcha66.jpeg cfxcaptcha/cvxcaptcha67.jpeg cfxcaptcha/cvxcaptcha68.jpeg cfxcaptcha/cvxcaptcha69.jpeg cfxcaptcha/cvxcaptcha70.jpeg cfxcaptcha/cvxcaptcha71.jpeg cfxcaptcha/cvxcaptcha72.jpeg cfxcaptcha/cvxcaptcha73.jpeg cfxcaptcha/cvxcaptcha74.jpeg cfxcaptcha/cvxcaptcha75.jpeg cfxcaptcha/cvxcaptcha76.jpeg cfxcaptcha/cvxcaptcha77.jpeg cfxcaptcha/cvxcaptcha78.jpeg cfxcaptcha/cvxcaptcha79.jpeg cfxcaptcha/cvxcaptcha80.jpeg cfxcaptcha/cvxcaptcha81.jpeg cfxcaptcha/cvxcaptcha82.jpeg cfxcaptcha/cvxcaptcha83.jpeg cfxcaptcha/cvxcaptcha84.jpeg cfxcaptcha/cvxcaptcha85.jpeg cfxcaptcha/cvxcaptcha86.jpeg cfxcaptcha/cvxcaptcha87.jpeg cfxcaptcha/cvxcaptcha88.jpeg cfxcaptcha/cvxcaptcha89.jpeg cfxcaptcha/cvxcaptcha90.jpeg cfxcaptcha/cvxcaptcha91.jpeg cfxcaptcha/cvxcaptcha92.jpeg cfxcaptcha/cvxcaptcha93.jpeg cfxcaptcha/cvxcaptcha94.jpeg cfxcaptcha/cvxcaptcha95.jpeg cfxcaptcha/cvxcaptcha96.jpeg cfxcaptcha/cvxcaptcha97.jpeg cfxcaptcha/cvxcaptcha98.jpeg cfxcaptcha/cvxcaptcha99.jpeg \
    78    icq/icq00.jpeg icq/icq01.jpeg icq/icq02.jpeg icq/icq03.jpeg icq/icq04.jpeg icq/icq05.jpeg icq/icq06.jpeg icq/icq07.jpeg icq/icq08.jpeg icq/icq09.jpeg icq/icq10.jpeg icq/icq11.jpeg icq/icq12.jpeg icq/icq13.jpeg icq/icq14.jpeg icq/icq15.jpeg icq/icq16.jpeg icq/icq17.jpeg icq/icq18.jpeg icq/icq19.jpeg icq/icq20.jpeg icq/icq21.jpeg icq/icq22.jpeg icq/icq23.jpeg icq/icq24.jpeg icq/icq25.jpeg icq/icq26.jpeg icq/icq27.jpeg icq/icq28.jpeg icq/icq29.jpeg icq/icq30.jpeg icq/icq31.jpeg icq/icq32.jpeg icq/icq33.jpeg icq/icq34.jpeg icq/icq35.jpeg icq/icq36.jpeg icq/icq37.jpeg icq/icq38.jpeg icq/icq39.jpeg icq/icq40.jpeg icq/icq41.jpeg icq/icq42.jpeg icq/icq43.jpeg icq/icq44.jpeg icq/icq45.jpeg icq/icq46.jpeg icq/icq47.jpeg icq/icq48.jpeg icq/icq49.jpeg icq/icq50.jpeg icq/icq51.jpeg icq/icq52.jpeg icq/icq53.jpeg icq/icq54.jpeg icq/icq55.jpeg icq/icq56.jpeg icq/icq57.jpeg icq/icq58.jpeg icq/icq59.jpeg icq/icq60.jpeg icq/icq61.jpeg icq/icq62.jpeg icq/icq63.jpeg icq/icq64.jpeg icq/icq65.jpeg icq/icq66.jpeg icq/icq67.jpeg icq/icq68.jpeg icq/icq69.jpeg icq/icq70.jpeg icq/icq71.jpeg icq/icq72.jpeg icq/icq73.jpeg icq/icq74.jpeg icq/icq75.jpeg icq/icq76.jpeg icq/icq77.jpeg icq/icq78.jpeg icq/icq79.jpeg icq/icq80.jpeg icq/icq81.jpeg icq/icq82.jpeg icq/icq83.jpeg icq/icq84.jpeg icq/icq85.jpeg icq/icq86.jpeg icq/icq87.jpeg icq/icq88.jpeg icq/icq89.jpeg icq/icq90.jpeg icq/icq91.jpeg icq/icq92.jpeg icq/icq93.jpeg icq/icq94.jpeg icq/icq95.jpeg icq/icq96.jpeg icq/icq97.jpeg icq/icq98.jpeg icq/icq99.jpeg \
  • pwntcha/trunk/testsuite/README

    r422 r424  
    33auditor
    44-------
     5
     6authimage
     7---------
    58
    69cfxcaptcha
Note: See TracChangeset for help on using the changeset viewer.