Ignore:
Timestamp:
Jan 3, 2005, 10:48:54 PM (18 years ago)
Author:
Sam Hocevar
Message:
  • use OpenCV rather than Imlib2 if both are available.
  • cleaned up the slashdot code.
  • decode phpBB captchas.
  • added filter_contrast.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pwntcha/trunk/src/main.c

    r388 r389  
    1212#include <stdio.h>
    1313#include <stdlib.h>
     14#include <string.h>
    1415#include <getopt.h>
    1516
     
    8889        }
    8990
    90         result = decode_slashdot(img);
     91        if(!strcmp(mode, "test"))
     92            result = decode_test(img);
     93        else if(!strcmp(mode, "phpbb"))
     94            result = decode_phpbb(img);
     95        else if(!strcmp(mode, "slashdot"))
     96            result = decode_slashdot(img);
     97        else
     98        {
     99            if(img->width == 320 && img->height == 50)
     100                result = decode_phpbb(img);
     101            else if(img->height == 69)
     102                result = decode_slashdot(img);
     103            else
     104            {
     105                fprintf(stderr, "%s: could not guess CAPTCHA type\n", argv[0]);
     106                printf("\n");
     107                image_free(img);
     108                continue;
     109            }
     110        }
     111
     112        image_free(img);
     113
    91114        if(!result)
    92115        {
Note: See TracChangeset for help on using the changeset viewer.