<?
$_POST['version'] = '1.0';
$_POST["address"] = '
www.eb.dk';$_POST["port"] = '80';
$_POST["file"] = '/';
$_POST["referer"] = '
http://www.dr.dk';$_POST['method'] = 'GET';
$_POST["hostname"] = '
www.eb.dk';$_POST['process'] = 'none';
$_POST["protocol"] = 'HTTP';
if(!empty($_POST["address"]) && !empty($_POST["port"]) && !empty($_POST["file"]))
{
$_POST["address"] = str_replace("
http://","",$_POST["address"]);
$fsock = @fsockopen($_POST["address"], $_POST["port"],$errno, $errstr,10);
if(!$fsock)
{
$error = "<b>ERROR</b><br />Could not open connection, are you sure a service is running on that port on that host? Is the host down?<br /><br />";
} else {
$out = $_POST['method']." ".stripslashes(str_replace(" ","%20",$_POST["file"]))." HTTP/".$_POST['version']."\r\n";
if($_POST['version']=="1.0")
{
$out .= "Accept-Encoding: \r\n";
} else {
$out .= "Accept: */*\r\n";
$out .= "Accept-Encoding: \r\n";
}
if(!empty($_POST["hostname"]))
{
$out .= "Host: ".stripslashes($_POST["hostname"])."\r\n";
}
if(!empty($_POST["referer"]))
{
$out .= "Referer: ".stripslashes($_POST["referer"])."\r\n";
}
if(!empty($_POST["cookie"]))
{
$out .= "Cookie: ".stripslashes($_POST['cookie'])."\r\n";
}
if(!empty($_POST["user_agent"]))
{
$out .= "User-Agent: ".stripslashes($_POST['user_agent'])."\r\n";
}
if(!empty($_POST["auth_string"]))
{
$out .= "Authorization: Basic ".base64_encode($_POST['auth_string'])."\r\n";
}
if(!empty($_POST["range"]))
{
$out .= "Range: bytes=".stripslashes($_POST['range'])."\r\n";
}
if(!empty($_POST["other_headers"]))
{
$out .= stripslashes($_POST['other_headers'])."\r\n";
}
$out .= "Connection: close\r\n";
if($_POST['method']=="POST" && !empty($_POST["post_data"]))
{
if(!empty($_POST['content_type']))
{
$out .= "Content-Type: ".stripslashes($_POST['content_type'])."\r\n";
} else {
$out .= "Content-Type: application/x-www-form-urlencoded\r\n";
}
$out .= "Content-Length: ".strlen(stripslashes(str_replace("\r\n","",$_POST['post_data'])))."\r\n\r\n";
$out .= stripslashes($_POST['post_data'])."\r\n";
}
$out .= "\r\n";
fputs($fsock, $out);
$hostname = @getHostByAddr($_POST["address"]);
if(!$hostname)
{
$hostname = htmlspecialchars($_POST["address"]);
}
$hostip = @getHostByName($_POST["address"]);
if(!$hostip)
{
$hostip = htmlspecialchars($_POST["address"]);
}
fclose($fsock);
}
}
header("Referer:
http://www.dr.dk");
header("Location:
http://www.eb.dk");
?>