3743

OrangeText.md Send SMS Captcha OCR

> 16) & 0xFF;$g = ($rgb >> 8) & 0xFF;$b = $rgb & 0xFF;$return=strtoupper(dechex($r).dechex($g).dechex($b));return $return;}function readletter($letter){/*Recunoaste cifra dintr-o imagine 18x40Input: imaginea $letterOutput: cifra in format textual*/$k=0;global $bg;if(getcolor($letter,7,12)==$bg) $k++;if(getcolor($letter,7,15)==$bg) $k++;if(getcolor($letter,7,18)==$bg) $k++;if(getcolor($letter,7,21)==$bg) $k++;if(getcolor($letter,10,12)==$bg) $k++;if(getcolor($letter,10,15)==$bg) $k++;if(getcolor($letter,11,16)==$bg) $k++;if(getcolor($letter,11,17)==$bg) $k++;if(getcolor($letter,10,18)==$bg) $k++;if(getcolor($letter,10,21)==$bg) $k++;if($k==10) return $f="0";$k=0;if(getcolor($letter,15,5)==$bg) $k++;if(getcolor($letter,15,10)==$bg) $k++;if(getcolor($letter,15,15)==$bg) $k++;if(getcolor($letter,15,20)==$bg) $k++;if(getcolor($letter,15,25)==$bg) $k++;if(getcolor($letter,6,15)==$bg) $k++;if(getcolor($letter,6,20)==$bg) $k++;if(getcolor($letter,6,25)==$bg) $k++;if($k==8) return $f="1";$k=0;if(getcolor($letter,2,10)==$bg) $k++;if(getcolor($letter,4,11)==$bg) $k++;if(getcolor($letter,8,11)==$bg) $k++;if(getcolor($letter,7,12)==$bg) $k++;if(getcolor($letter,5,15)==$bg) $k++;if(getcolor($letter,14,17)==$bg) $k++;if(getcolor($letter,3,20)==$bg) $k++;if(getcolor($letter,12,20)==$bg) $k++;if(getcolor($letter,11,25)==$bg) $k++;if(getcolor($letter,2,26)==$bg) $k++;if(getcolor($letter,2,27)==$bg) $k++;if(getcolor($letter,11,27)==$bg) $k++;if($k==12) return $f="7";$k=0;if(getcolor($letter,1,5)==$bg) $k++;if(getcolor($letter,2,15)==$bg) $k++;if(getcolor($letter,2,19)==$bg) $k++;if(getcolor($letter,6,15)==$bg) $k++;if(getcolor($letter,8,13)==$bg) $k++;if(getcolor($letter,12,23)==$bg) $k++;if(getcolor($letter,13,22)==$bg) $k++;if(getcolor($letter,15,21)==$bg) $k++;if(getcolor($letter,15,5)==$bg) $k++;if(getcolor($letter,8,15)==$bg) $k++;if(getcolor($letter,5,18)==$bg) $k++;if($k==11) if(!$f) return $f=2;$k=0;if(getcolor($letter,8,11)==$bg) $k++;if(getcolor($letter,5,13)==$bg) $k++;if(getcolor($letter,3,14)==$bg) $k++;if(getcolor($letter,4,16)==$bg) $k++;if(getcolor($letter,3,17)==$bg) $k++;if(getcolor($letter,3,19)==$bg) $k++;if(getcolor($letter,5,20)==$bg) $k++;if(getcolor($letter,7,23)==$bg) $k++;if(getcolor($letter,10,21)==$bg) $k++;if($k==9) if(!$f) return $f=3;$k=0;if(getcolor($letter,9,5)==$bg) $k++;if(getcolor($letter,6,6)==$bg) $k++;if(getcolor($letter,4,9)==$bg) $k++;if(getcolor($letter,2,12)==$bg) $k++;if(getcolor($letter,16,10)==$bg) $k++;if(getcolor($letter,8,18)==$bg) $k++;if(getcolor($letter,16,17)==$bg) $k++;if(getcolor($letter,3,27)==$bg) $k++;if(getcolor($letter,6,27)==$bg) $k++;if(getcolor($letter,16,27)==$bg) $k++;if($k==10) if(!$f) return $f=4;$k=0;if(getcolor($letter,15,11)==$bg) $k++;if(getcolor($letter,10,18)==$bg) $k++;if(getcolor($letter,7,19)==$bg) $k++;if(getcolor($letter,3,20)==$bg) $k++;if(getcolor($letter,7,21)==$bg) $k++;if(getcolor($letter,10,21)==$bg) $k++;if(getcolor($letter,16,28)==$bg) $k++;if(getcolor($letter,3,20)==$bg) $k++;if(getcolor($letter,4,20)==$bg) $k++;if(getcolor($letter,5,20)==$bg) $k++;if($k==10) if(!$f) return $f=5;$k=0;if(getcolor($letter,16,5)==$bg) $k++;if(getcolor($letter,2,6)==$bg) $k++;if(getcolor($letter,7,12)==$bg) $k++;if(getcolor($letter,15,14)==$bg) $k++;if(getcolor($letter,16,14)==$bg) $k++;if(getcolor($letter,7,20)==$bg) $k++;if(getcolor($letter,10,20)==$bg) $k++;if(getcolor($letter,7,22)==$bg) $k++;if(getcolor($letter,10,22)==$bg) $k++;if(getcolor($letter,16,27)==$bg) $k++;if(getcolor($letter,2,28)==$bg) $k++;if($k>=11) if(!$f) return $f=6;if(!$f) return $f=8;}/*Obtinerea imaginii CAPTCHA de pe orange_text.md*/$base_url="https://www.orangetext.md/?renderImg=IV";$ch=curl_init();curl_setopt($ch, CURLOPT_URL, $base_url);curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_HEADER,false);curl_setopt($ch, CURLOPT_REFERER, false);curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);if($proxy && $proxy_port) curl_setopt($ch, CURLOPT_PROXY, "{$proxy}:{$proxy_port}"); //Utilizarea Proxy$data = curl_exec($ch);$ff=fopen("img.png","w+"); //Copierea imaginii captcha localfwrite($ff,$data);fclose($ff);$img = LoadPNG('img.png');$bg="F9F9F9"; // Background-ul imaginii captcha$letter_width=18;for($i=1;$i
0