brentbxr / omeglespyx

Automatically exported from code.google.com/p/omeglespyx
0 stars 0 forks source link

Too many captcha #40

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Captcha is appearing literally every time I start a new conversation, and even 
if I input it correctly sometimes another one pops up. This happens with new 
conversations and with just swapping strangers. I'm using OmegleSpyX v2.1.1.

It's just made the whole experience incredibly tedious and ruined a great 
application...

Original issue reported on code.google.com by thegim...@gmail.com on 10 Jun 2012 at 1:02

GoogleCodeExporter commented 8 years ago
There is nothing I can do about the number of captchas you get, unfortunately. 
It depends entirely on Omegle, and not the application. I've noticed that 
Omegle must keep some kind of IP blacklist. If you're on the list (or if Omegle 
are just having a bad day) you get a captcha literally every single connection 
- which I know is annoying. 

Bear in mind that when you use the application you are dealing with two 
simultaneous connections from Omegle - and the likelihood is that you're 
disconnecting/reconnecting/swapping conversations very regularly.

The only way for me to improve that annoying little captcha is to somehow 
bypass it. Because they use Google's captcha an OCR engine will not work. Using 
proxies slows down the application so much that it's almost unusable. 

I know that it is a problem and I am still in need of a solution.

Original comment by malaco...@gmail.com on 10 Jun 2012 at 7:25

GoogleCodeExporter commented 8 years ago
Maybe this script will work to bypass the captcha.

<?php
// CAPTCHA Bypass Code (Works 99%)

function  imageconverttruecolor(&$image)
{ 
    $width = imagesx($image); 
    $height = imagesy($image);    
    $final = imagecreatetruecolor($width, $height); 
    imagecopy($final, $image, 0, 0, 0, 0, $width, $height); 
    imagedestroy($image);   $image = $final;
}

// load images

$background = imagecreatefrompng("captcha.png");
$lettersimg = imagecreatefrompng("letters.png");
$captcha = imagecreatefrompng("http://www.omegle.com/captcha.php"); //captcha 
location
imageconverttruecolor($background);imageconverttruecolor($lettersimg);
imageconverttruecolor($captcha);
// first parse - difference test and pixel save
$pixels = array();
for($x = 0; $x < imagesx($captcha); $x++)
{    
    for($y = 0; $y < imagesy($captcha); $y++)
    {       
        $src = imagecolorat($background, $x, $y);       
        $dst = imagecolorat($captcha, $x, $y);      
        if(!($src == 0 && $dst == 0) && ($src == $dst))          
        $pixels[$x][$y] = 0xFFFFFF;        
        else $pixels[$x][$y] = 0x000000;       
    }
}
imagedestroy($background);

// second parse - filter out pixel noise

for($p = 0; $p < 3; $p++)
{ 
    // 3 noise parses 
    for($x = 0; $x <  imagesx($captcha); $x++)
    {       
        for($y = 0; $y < imagesy($captcha); $y++)
        {           
            $filterpixel = true;            
            if(!$pixels[$x-1][$y-1] && !$pixels[$x+0][$y-1] && !$pixels[$x+1][$y-1]) 
            $filterpixel = false; 
            // top           
            if(!$pixels[$x+1][$y-1] && !$pixels[$x+1][$y+0] && !$pixels[$x+1][$y+1]) 
            $filterpixel = false; 
            // right         
            if(!$pixels[$x-1][$y+1] && !$pixels[$x+0][$y+1] && !$pixels[$x+1][$y+1]) 
            $filterpixel = false; 
            // bottom            
            if(!$pixels[$x-1][$y-1] && !$pixels[$x-1][$y+0] && !$pixels[$x-1][$y+1]) 
            $filterpixel = false; 
            // left          
            if($filterpixel) $pixels[$x][$y] = 0xFFFFFF;        
        }   
    }
}
for($x = 0; $x < imagesx($captcha); $x++)
{ 
    $pixels[$x][0] = 0xFFFFFF;  
    $pixels[$x][1] = 0xFFFFFF;  
    $pixels[$x][imagesy($captcha) - 1] = 0xFFFFFF;  
    $pixels[$x][imagesy($captcha) - 2] = 0xFFFFFF;
}
for($y = 0; $y < imagesy($captcha); $y++)
{    
    $pixels[0][$y] = 0xFFFFFF;  $pixels[1][$y] = 0xFFFFFF;  
    $pixels[imagesx($captcha) - 1][$y] = 0xFFFFFF;  
    $pixels[imagesx($captcha) - 2][$y] = 0xFFFFFF;
}
for($x = 50; $x < 54; $x++)
{  
    for($y = 2; $y < 5; $y++)
    {       
        $pixels[$x][$y] = 0xFFFFFF; 
    }
}
// third parse - rebuild image (just for show)
for($x = 0; $x < imagesx($captcha); $x++)
{   
    for($y = 0; $y < imagesy($captcha); $y++)
    {       
        imagesetpixel($captcha, $x, $y, 0xFFFFFF);      
        if(($x % 3) == 0 && ($y % 3) == 0 && $pixels[$x][$y] == 0)
        {         
            imagesetpixel($captcha, $x, $y, 0xFF0000);      
        }   
    }
}
// fourth parse - basic ocr (slow) :-(
$letters = 'ABCE'; 
$ocr = '';
for($x1 = 0; $x1 < imagesx($captcha) - 25; $x1++)
{  
    for($y1 = 0; $y1 < imagesy($captcha) - 27; $y1++)
    {       
        $score = array();       
        for($letter = 0; $letter < 4; $letter++)
        {            
            for($x2 = 0; $x2 <  25; $x2++)
            {              
                for($y2 = 0; $y2 < 27; $y2++)
                {                   
                    $color = imagecolorat($lettersimg, ($letter * 25) + $x2, $y2);                  
                    if($pixels[$x1 + $x2][$y1 + $y2] == $color && $color == 0) 
                    $score[$letter][0]++;                    
                    if($color == 0) $score[$letter][1]++;               
                }           
            }       
        }       
        $found = -1; $highest = 0;      
        for($letter = 0; $letter < 4; $letter++)
        {            
            $result = (($score[$letter][1] / 100) * 90);           
            if($score[$letter][0] >= $result)
            {               
                $result = ($score[$letter][0] - $result);               
                if($result > $highest)
                {                  
                    $highest = $result;                 
                    $found = $letter;               
                }           
            }       
        }       
        if($found > -1)
        {         
            $ocr .= $letters[$found];           
            $x1  += 10;     
        }       
        unset($score);  
    }
}
imagedestroy($lettersimg);unset($pixels);
// last of all output 
header('Content-Type: image/png');
imagestring($captcha, 2, 0, 0, $ocr, 0);
imagepng($captcha);
imagedestroy($captcha);
?>

Original comment by Koen.Des...@gmail.com on 12 Jul 2012 at 9:58

GoogleCodeExporter commented 8 years ago
xD Sorry for a noob question, but where do I insert this code?

Original comment by NhiBT...@gmail.com on 22 Jul 2012 at 3:49

GoogleCodeExporter commented 8 years ago
It's not a noob question - the implementation of this code would be by me, not 
you. ^^

As far as I can see this script works the same as your conventional OCR engine, 
in which case it would be unsuccessful in being able to recognise the 
'challenge word'. Since Omegle uses Google's captchas, it simply wouldn't work. 
I've even tried using tesseract (http://code.google.com/p/tesseract-ocr/) which 
is, like I said, simply unsuccessful on the challenge word.

Using an OCR engine is an unreliable way to bypass the captcha - alternative 
solutions such as using proxy servers are much more promising.

Original comment by malaco...@gmail.com on 25 Jul 2012 at 3:34

GoogleCodeExporter commented 8 years ago
What about making use of a SOCKS4/5 or HTTP Proxy for Stranger 2, for example?

Original comment by spinkz...@gmail.com on 14 Aug 2012 at 3:16

GoogleCodeExporter commented 8 years ago
jhnfkojvn jkb

Original comment by peralam...@gmail.com on 28 Nov 2014 at 5:30