Kaynağa Gözat

* easter eggs

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/pwntcha/trunk@499 92316355-f0b4-4df1-b90c-862c8a59935f
master
sam 19 yıl önce
ebeveyn
işleme
a257c902d6
3 değiştirilmiş dosya ile 44 ekleme ve 12 silme
  1. +1
    -0
      src/Makefile.am
  2. +26
    -0
      src/easter-eggs.c
  3. +17
    -12
      src/main.c

+ 1
- 0
src/Makefile.am Dosyayı Görüntüle

@@ -19,6 +19,7 @@ pwntcha_SOURCES = \
tickets.c \
vbulletin.c \
xanga.c \
easter-eggs.c \
test.c
pwntcha_CFLAGS = $(ADDITIONAL_CFLAGS) -Wall -O6
pwntcha_LDFLAGS = $(ADDITIONAL_LDFLAGS)


+ 26
- 0
src/easter-eggs.c Dosyayı Görüntüle

@@ -0,0 +1,26 @@
/*
* easter-eggs.c: captcha decoder for well known pictures
* $Id$
*
* Copyright: (c) 2005 Sam Hocevar <sam@zoy.org>
* This program is free software; you can redistribute it and/or
* modify it under the terms of the Do What The Fuck You Want To
* Public License as published by Banlu Kemiyatorn. See
* http://sam.zoy.org/projects/COPYING.WTFPL for more details.
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "config.h"
#include "common.h"

/* Main function */
char *decode_easter_eggs(struct image *img)
{
char *result = strdup("OMFG GOATSERY");

return result;
}


+ 17
- 12
src/main.c Dosyayı Görüntüle

@@ -158,64 +158,69 @@ int main(int argc, char *argv[])
{
if(img->width == 155 && img->height == 50)
{
dprintf("autodetected authimage captcha\n");
dprintf("probably an authimage captcha\n");
result = decode_authimage(img);
}
else if(img->width == 175 && img->height == 35)
{
dprintf("autodetected livejournal captcha\n");
dprintf("probably a livejournal captcha\n");
result = decode_livejournal(img);
}
else if(img->width == 100 && img->height == 40 && count < 6)
{
dprintf("autodetected linuxfr captcha\n");
dprintf("probably a linuxfr captcha\n");
result = decode_linuxfr(img);
}
else if(img->width == 69 && img->height == 35)
{
dprintf("autodetected lmt.lv captcha\n");
dprintf("probably a lmt.lv captcha\n");
result = decode_lmt(img);
}
else if(img->width == 208 && img->height == 26)
{
dprintf("autodetected Paypal captcha\n");
dprintf("probably a Paypal captcha\n");
result = decode_paypal(img);
}
else if(img->width == 320 && img->height == 50)
{
dprintf("autodetected phpBB captcha\n");
dprintf("probably a phpBB captcha\n");
result = decode_phpbb(img);
}
else if(img->width == 170 && img->height == 50)
{
dprintf("autodetected Xanga captcha\n");
dprintf("probably a Xanga captcha\n");
result = decode_xanga(img);
}
else if(img->height <= 40 && count < 10)
{
dprintf("autodetected scode/trencaspammers captcha\n");
dprintf("probably a scode/trencaspammers captcha\n");
result = decode_scode(img);
}
else if(img->height <= 30 && count < 100)
{
dprintf("autodetected clubic captcha\n");
dprintf("probably a clubic captcha\n");
result = decode_clubic(img);
}
else if(img->height == 69)
{
dprintf("autodetected slashdot captcha\n");
dprintf("probably a slashdot captcha\n");
result = decode_slashdot(img);
}
else if(img->width == 200 && img->height == 40)
{
dprintf("autodetected tickets.com captcha\n");
dprintf("probably a tickets.com captcha\n");
result = decode_tickets(img);
}
else if(img->height == 61)
{
dprintf("autodetected vbulletin captcha\n");
dprintf("probably a vbulletin captcha\n");
result = decode_vbulletin(img);
}
else if(img->width == 480 && img->height == 360 && count == 253)
{
dprintf("probably not a captcha\n");
result = decode_easter_eggs(img);
}
else
{
dprintf("could not guess captcha type\n");


Yükleniyor…
İptal
Kaydet