Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // www.zeldin.link
- define("Checked_Folder", "Checked_Proxy"); // SAVED PROXY TO THIS FOLDER.
- if(!is_dir(Checked_Folder)){
- mkdir(Checked_Folder) or die("Unable to make dir");
- }
- function color($opt = 'cyan', $text){
- $green = "\e[1;92m";
- $cyan = "\e[1;36m";
- $normal = "\e[0m";
- $blue = "\e[34m";
- $yellow = "\e[93m";
- $red = "\e[1;91m";
- switch($opt){
- case 'merah':
- return $red.$text.$normal;
- break;
- case 'hijau':
- return $green.$text.$normal;
- break;
- case 'biru':
- return $blue.$text.$normal;
- break;
- case 'cyan':
- return $cyan.$text.$normal;
- break;
- case 'kuning':
- return $yellow.$text.$normal;
- break;
- case 'normal':
- return $normal.$text.$normal;
- break;
- default:
- return $cyan.$text.$normal;
- break;
- }
- }
- function Save($title, $text){
- $fopen = fopen($title, "a");
- fwrite($fopen, $text);
- fclose($fopen);
- }
- function curl($url){
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
- curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['USER_AGENT']);
- curl_setopt($ch, CURLOPT_TIMEOUT, 23);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 23);
- $cx = curl_exec($ch);
- if(!$cx){
- return "CURL ERROR : ".curl_error($ch);
- }else{
- return $cx;
- }
- curl_close($ch);
- }
- echo "[?] SOCKS5 or Normal Proxies? [s/np] : "; $type = trim(fgets(STDIN));
- if($type == "s"){
- $title = Checked_Folder."/LiveSocks_".date("d-m-Y").".txt";
- $param = "&proxy_type=socks";
- }elseif($type == "np"){
- $title = Checked_Folder."/LiveNP_".date("d-m-Y").".txt";
- $param = "";
- }else{
- die("Choose Your Choice!");
- }
- echo "[#] FILE : "; $f = trim(fgets(STDIN));
- if(is_file($f) && file_exists($f)){
- echo "[#] DELIMITER : "; $d = trim(fgets(STDIN));
- $fgc = file_get_contents($f);
- $proxy = explode("\n", $fgc);
- $count = count($proxy);
- echo exec("clear");
- echo "[#] PROXY TOTAL : ".$count."\n";
- $i = 1;
- foreach($proxy as $ipport){
- $s = explode($d, $ipport);
- $ip = trim($s[0]);
- $port = trim($s[1]);
- $get = curl("https://toeyoel-sgb104931.c9users.io/p.php?ip=$ip&port=$port&timeout=20".$param);
- $dcd = json_decode($get, true);
- if($dcd['result']['success'] == true){
- echo color("hijau", "[".$i++."/".$count."] [ LIVE ] | ".$dcd['result']['proxy']['ip'].":".$dcd['result']['proxy']['port']."\n");
- Save($title, $dcd['result']['proxy']['ip'].":".$dcd['result']['proxy']['port']."\n");
- }else{
- echo color("merah", "[".$i++."/".$count."] [ DIE ] | ".$dcd['result']['proxy']['ip'].":".$dcd['result']['proxy']['port']." | ".$dcd['result']['error']."\n");
- }
- }
- }else{
- die("[!] FILE NOT FOUND.");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement