1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Ocr Breaker PHP

Discussion in 'Black Hat SEO Tools' started by superdone, Aug 21, 2011.

  1. superdone

    superdone Newbie

    Joined:
    Aug 21, 2011
    Messages:
    3
    Likes Received:
    0
    Before.. I'm sorry if I'm wrong room :(

    please help me to improve my php scripts, these scripts are not now able to automatically post. Since the captcha is already in the update
    This is the kind of captcha is used now:

    i . i m g u r . c ** / q 6 7 Z M . g i f

    The following script that I used before:

    PHP:
    <?
      
    error_reporting(0);
      class 
    OCRbreaker {
        function 
    read($data) {
        
    $orig  imagecreatefromstring($data);
        
    $letter_num 2;

        
    $pos = array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");
        
    $code '';
        
    $lbl "";
        
    $hasil = array();
        foreach (
    $pos as $p1) {
            foreach (
    $pos as $p2) {
                
    $lbl $p1.$p2;
                
    $gbr $this->gambar($lbl);
                
    $skor $this->beda($orig$gbr);
                
    $hasil[$lbl] = $skor;
            }
        }
        
    asort($hasil);
        foreach (
    $hasil as $k=>$v) { $kode $k; break; }
            return 
    $kode;
      }

      function 
    ketengah($image$image_width$string$font_size$y$color) {
        
    $text_width imagefontwidth($font_size)*strlen($string);
        
    $center ceil($image_width 2);
        
    $x $center - (ceil($text_width/2));
        
    ImageString($image$font_size$x$y$string$color);
      }
      function 
    gambar($teks) {
        
    $width 30;
        
    $height 20;

        
    $image ImageCreate($width$height);
        
    $black ImageColorAllocate($image000);
        
    $white ImageColorAllocate($image255255255);
        
    $grey ImageColorAllocate($image200200200);
        
    ImageFill($image00$white);
        
    $this->ketengah($image$width$teks33$black);
        
    ImageRectangle($image,0,0,$width-1,$height-1,$grey);
        return 
    $image;
      }
      function 
    gambar_canvas($teks) {
        
    $img $this->gambar($teks);
        
    header("Content-Type: image/jpeg");
        
    ImageJpeg($img);
        
    ImageDestroy($img);
      }

      function 
    beda($i1$i2) {
        
    $sx1 imagesx($i1);
        
    $sy1 imagesy($i1);

        if (
    $sx1 !== imagesx($i2) || $sy1 !== imagesy($i2)) {
            return 
    100;
        }

        
    $diffi imagecreatetruecolor($sx1$sy1);
        
    $green imagecolorallocate($diffi02550);
        
    imagefill($diffi00imagecolorallocate($diffi000));

        
    $different_pixels 0;

        for (
    $x 0$x $sx1$x++) {
            for (
    $y 0$y $sy1$y++) {

                
    $rgb1 imagecolorat($i1$x$y);
                
    $pix1 imagecolorsforindex($i1$rgb1);

                
    $rgb2 imagecolorat($i2$x$y);
                
    $pix2 imagecolorsforindex($i2$rgb2);

                if (
    $pix1 !== $pix2) {
                    
    $different_pixels++;
                    
    imagesetpixel($diffi$x$y$green);
                }

            }
        }

        if (!
    $different_pixels) {
            return 
    0;
        } else {
            
    $total $sx1 $sy1;
            return 
    number_format(100 $different_pixels $total2);
        }
      }
    }
    ?>
    I really hope someone helps me to update my script to function again. Thank you
     
  2. superdone

    superdone Newbie

    Joined:
    Aug 21, 2011
    Messages:
    3
    Likes Received:
    0
    Please help me :(
     
  3. superdone

    superdone Newbie

    Joined:
    Aug 21, 2011
    Messages:
    3
    Likes Received:
    0
    Anybody help me :(
     
  4. dragonrage01

    dragonrage01 Power Member

    Joined:
    May 19, 2011
    Messages:
    674
    Likes Received:
    155
    looks very complicated. I don't think people in here know much about coding. Try the programming section. Most bhw members rely on paid softwares so I seriously doubt most members in here can help you.
     
  5. Drink More Tea

    Drink More Tea Regular Member

    Joined:
    Apr 15, 2011
    Messages:
    208
    Likes Received:
    166
  6. StellaArtois

    StellaArtois BANNED BANNED

    Joined:
    Jun 13, 2011
    Messages:
    104
    Likes Received:
    354
    What exactly is the problem? I can help, but I need to know the issue you want solving.