« Previous entry | Next entry » Browse > Snippets

Skip to comments (9) Decoding CAPTCHA using PHP
Posted by TheJohnDoe2005 on Jun 07 2006 @ 11:54  :: 5861 unique visits

Interesting Article that I have found. I Did an upload of a sample CAPTCHA on the site and it did manage to decode it without any hassle....http://captcha.megaleecher.net

Main Story
http://digg.com/programming/Decoding_CAPTCHA_using_PHP

Site Story
http://captcha.megaleecher.net

CODE: PHP
NOTE: I removed the data between the two quotes because it is too long. You can go to the site to download the full source code.
       
        $a=explode(";","");


CODE: PHP
function rapidcode($image)
{
    $im=@ImageCreateFromPng($image);
   
    if($im)
    {
        $a=explode(";","");

        for($i=0;$i<34&&!isset($f);$i++)
        {
            $d=explode(",", $a[$i]);
   
            foreach($d as $xy)
            {
                $x=substr($xy,0,2);
                $y=substr($xy,2);
                if(ImageColorAt($im,$x,$y)!=16777215) $f=$i;
                else{unset($f);break;}
            }
        }

        for($i=0;$i<34&&!isset($z);$i++)
        {
            $d=explode(",", $a[$i]);

            foreach($d as $xy)
            {
                $x=substr($xy,0,2)+20;
                $y=substr($xy,2);
                if(ImageColorAt($im,$x,$y)!=16777215) $z=$i;
                else{unset($z);break;}
            }
        }

        for($i=0;$i<34&&!isset($t);$i++)
        {
            $d=explode(",",$a[$i]);

            foreach($d as $xy)
            {
                $x=substr($xy,0,2)+40;
                $y=substr($xy,2);
                if(ImageColorAt($im,$x,$y)!=16777215)$t=$i;
                else{unset($t);break;}
            }
        }
    } // End IF

    $s="RB8DKAW6H0S953NXGMEPU4IF2T1VJZCYL7";

    if(isset($f))$f=substr($s,$f,1);
    if(isset($z))$z=substr($s,$z,1);
    if(isset($t))$t=substr($s,$t,1);
    if(isset($f)&&isset($z))return $f.$z.$t;
    else return FALSE;

}
?>

9 comments posted so far
Add your own »

1. On Jun 30 2006 @ 11:37 sian wrote:

hello

2. On Jun 30 2006 @ 11:38 sian wrote:

sian n jodie woz ere in i.t boored 06

3. On Sep 07 2006 @ 16:24 vhortex wrote:

this no longer work.. thanks to digg it

4. On Aug 25 2007 @ 18:29 Niels wrote:

Now the site is dead there is no full code :/

5. On Mar 19 2008 @ 11:05 guest wrote:

I managed to get my hands on it.

I give you guys a hint

archive.org

9. On Jan 05 2010 @ 14:45 uggbaileybutton wrote:

bailey button uggs

-ugg boots cheap

ugg boots uk

ugg classic

Add a new comment

Name:
Password: (leave empty for anonymous comment)
 
View formatting tags Comment: