zepek_al

Grabber Hide My Ass By Zepek

Nov 9th, 2017
1,091
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.88 KB | None | 0 0
  1. <?php
  2. /*
  3. Filename: Hidemyass Proxy Grabber
  4. Coder: live:zepek_al
  5. */
  6. class zepek{
  7. private $negara;
  8. private $type;
  9. private $anon;
  10. private $speed;
  11. private $connect_time;
  12. public $filter_speed=array(1,0);
  13. public $filter_connection_time=array(1,0);
  14. public $jumlah=50;
  15. public $no_country=array();
  16. function __construct($x){
  17. if(!function_exists("curl_init"))exit("curl not found :p");
  18. $this->speed=$x[0];
  19. $this->connect_time=$x[1];
  20. $this->negara=$x[2];
  21. $this->type=$x[3];
  22. $this->anon=$x[4];
  23. }
  24. function curl($url,$data=null){
  25. $ch = curl_init();
  26. curl_setopt($ch, CURLOPT_URL, $url);
  27. if($data != null){
  28. curl_setopt($ch, CURLOPT_POST, true);
  29. curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
  30. }
  31. curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; rv:33.0) Gecko/20100101 Firefox/33.0");
  32. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  33. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  34. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  35. //curl_setopt($ch, CURLOPT_VERBOSE, true);
  36. //curl_setopt($ch, CURLOPT_TIMEOUT, 13);
  37. $exec = curl_exec($ch);
  38. curl_close($ch);
  39. return $exec;
  40. }
  41. function cekIP($arr,$pola){
  42. $pola=preg_replace("|\s+|","",$pola);
  43. if(preg_match("{display\:inline}si", $pola))return true;
  44. else if(preg_match("{class}", $pola)){
  45. $pecah=explode("=",$pola);
  46. $class=str_replace("\"","",trim(end($pecah)));
  47. if(isset($arr[$class]) && $arr[$class]!="none")return true;
  48. else if(!isset($arr[$class]))return true;
  49. }
  50. }
  51. function Gay(){
  52. $total=0;
  53. $next=2;
  54. $data=$this->curl("http://proxylist.hidemyass.com/");
  55. //$data=file_get_contents("proxyass.html");
  56. //$data=file_get_contents("proxy2.html");
  57. do{
  58. preg_match("#\<tbody\>(.*?)\</tbody\>#is", $data, $m);
  59. $doc=new DOMDocument;
  60. $doc->loadHTML($m[1]);
  61. $tr=$doc->getElementsByTagName("tr");
  62. $keyTr=0;
  63. while($keyTr<$tr->length && $total<$this->jumlah){
  64. //foreach($tr as $key=>$trCok){
  65. $lewati=false;
  66. $trCok=$tr->item($keyTr);
  67. $anak=$trCok->childNodes;
  68. $html='';
  69. foreach($anak as $mbuh){
  70. $html.=$trCok->ownerDocument->saveHTML($mbuh);
  71. }
  72. preg_match("{\<span\>\s+\<style\>(.*?)\</style\>}s", $html, $m);
  73. $css=explode("\n",trim($m[1]));
  74. foreach($css as $mbuh){
  75. $gay=explode("{",$mbuh);
  76. $keyCuk=str_replace(".","",$gay[0]);
  77. if(preg_match("/display:none/si", $mbuh))$style[$keyCuk]="none";
  78. else if(preg_match("/display:inline/si", $mbuh))$style[$keyCuk]="inline";
  79. }
  80. $homo=preg_split("{[<>]}si", $html);
  81. unset($proxy);
  82. unset($jancok);
  83. foreach($homo as $key=>$ikkeh){
  84. if(preg_match("{class=\"country\" rel=\"}",$ikkeh)){
  85. //echo $ikkeh."\n".$key;die;
  86. $kode_negara=substr(trim($ikkeh),-3,2);
  87. //echo $kode_negara."\n";
  88. if(in_array($kode_negara,$this->no_country)){
  89. $lewati=true;
  90. $keyTr++;
  91. //echo "asu{$keyTr}";
  92. break;
  93. }
  94. }else if(is_numeric(trim($ikkeh))){
  95. if($this->cekIP($style,$homo[$key-1]) || preg_match("{^/}is", $homo[$key-1]))$proxy[]=trim($ikkeh);
  96. if($homo[$key-1]=="td" && $homo[$key+1]=="/td")$port=trim($ikkeh);
  97. //echo $homo[$key-1]."\n";
  98. }else if($key<count($homo)-1 && $key>1){
  99. if($homo[$key-1]=="td" && $homo[$key+1]=="/td")$type=$ikkeh;
  100. if($homo[$key-1]=="td nowrap" && $homo[$key+1]=="/td")$anon=$ikkeh;
  101. if(preg_match("{^img src}is",$homo[$key-1]) && preg_match("{^/}",$homo[$key+1]))$negara=$ikkeh;
  102. if(preg_match("{div class\=\"indicator\"}is", $homo[$key])){
  103. if(preg_match("{0, 173, 173}",$homo[$key]))$kode=0;
  104. else if(preg_match("{255, 204, 0}",$homo[$key]))$kode=1;
  105. else if(preg_match("{237, 28, 36}",$homo[$key]))$kode=2;
  106. if(!isset($jancok["speed"])){
  107. $jancok["speed"]=$kode;
  108. }
  109. else $jancok["connect_time"]=$kode;
  110. }
  111. }
  112. }
  113. if($lewati)continue;
  114. $status1=null;$status2=null;
  115. switch($jancok["speed"]){
  116. case 0:$status1="Hight";break;
  117. case 1:$status1="Medium";break;
  118. case 2:$status1="Low";break;
  119. default:$status1=null;break;
  120. }
  121. switch($jancok["connect_time"]){
  122. case 0:$status2="Hight";break;
  123. case 1:$status2="Medium";break;
  124. case 2:$status2="Low";break;
  125. default:$status2=null;break;
  126. }
  127. $mbut= preg_replace("{\.+}", ".",implode('.',$proxy).":".$port);
  128. $mbut.=($this->speed)?" ".$status1:null;
  129. $mbut.=($this->connect_time)?" ".$status2:null;
  130. $mbut.=($this->negara)?" ".$negara:null;
  131. $mbut.=($this->type)?" ".$type:null;
  132. $mbut.=($this->anon)?" ".$anon:null;
  133. $keyTr++;
  134. if(in_array($jancok["speed"],$this->filter_speed) && in_array($jancok["connect_time"],$this->filter_connection_time)){
  135. $jembuts[]=$mbut;
  136. $total++;
  137. //echo $total." ".$keyTr."\n";
  138. }
  139. }
  140. if($total<$this->jumlah){
  141. $data=$this->curl("http://proxylist.hidemyass.com/".$next."#listable");
  142. $next++;
  143. }
  144. }while($total<$this->jumlah && $next<=5);
  145. return $jembuts;
  146. }
  147. }
  148. $x[0]=false; //tampil speed
  149. $x[1]=false; //tampil connection time
  150. $x[2]=false; //tampil negara
  151. $x[3]=false; //tampil type proxy
  152. $x[4]=false; //tampil Anon
  153. $gay=new rieqyns13($x);
  154. /*
  155. 0=low
  156. 1=medium
  157. 2=high
  158. */
  159. $gay->jumlah=100;
  160. $gay->filter_speed=array(0,1,2);
  161. $gay->filter_connection_time=array(0,1,2);
  162. $gay->no_country=array("cn");
  163. foreach($gay->Gay() as $homo)echo $homo."\n";
  164. ?>
Advertisement
Add Comment
Please, Sign In to add comment