"5f4dcc3b5aa765d61d8327deb882cf99"); // User list in format UserName => MD5 of Password. To MD5 a string, uncomment the code below the salt and visit the location of this file. The password for the default user is password, be sure to make the username lowercase so it can work well with the system.
$_CS['salt'] = ""; // Put a random bit of string here to make the cookie a bit more random.
error_reporting(0);
/*
// Beginning of MD5 code.
if (isset($_REQUEST['string']))
echo md5($_REQUEST['string'])."
";
?>
exit();
// End of MD5 code.
*/
$_CS['domain'] = $_SERVER['SERVER_NAME'];
$_CS['port'] = $_SERVER['SERVER_PORT'];
$_CS['ssl'] = ($_SERVER['HTTPS']=="on");
if ($_SERVER['REMOTE_ADDR'])
$_CS['ip'] = $_SERVER['REMOTE_ADDR'];
if ($_SERVER['HTTP_PC_REMOTE_ADDR'])
$_CS['ip'] = $_SERVER['HTTP_PC_REMOTE_ADDR'];
if ($_SERVER['HTTP_CLIENT_IP'])
$_CS['ip'] = $_SERVER['HTTP_CLIENT_IP'];
if ($_SERVER['HTTP_X_FORWARDED_FOR'])
$_CS['ip'] = $_SERVER['HTTP_X_FORWARDED_FOR'];
$_CS['installPath'] = substr($_SERVER['SCRIPT_NAME'], 0, strlen($_SERVER['SCRIPT_NAME'])-strlen(end(explode("/", $_SERVER['SCRIPT_NAME']))));
function generateURL($path) {
global $_CS;
return "http".($_CS['ssl'] ? "s" : "")."://".$_CS['domain'].(((!$_CS['ssl'] && $_CS['port']==80) || ($_CS['ssl'] && $_CS['port']==443)) ? "" : ":{$_CS['port']}").$_CS['installPath'].$path;
}
$_CS['cookiePrefix'] = "";
$_CS['cookiePath'] = $_CS['installPath'];
$_CS['cookieDomain'] = ".".str_replace("www.", "", $_CS['domain']);
$_CS['loggedIn'] = false;
if (!empty($_COOKIE["{$_CS['cookiePrefix']}user"])) {
$password = $_CS['users'][$_COOKIE["{$_CS['cookiePrefix']}user"]];
if (md5($_CS['salt'].$password)==$_COOKIE["{$_CS['cookiePrefix']}password"])
$_CS['loggedIn'] = true;
}
if (isset($_REQUEST['login'])) {
$password = $_CS['users'][strtolower($_REQUEST['user'])];
if ($password==md5($_REQUEST['password'])) {
setcookie("{$_CS['cookiePrefix']}user", strtolower($_REQUEST['user']), $_CS['time']+31536000/* 1 year */, $_COOKIE['cookiePath'], $_COOKIE['cookieDomain']);
setcookie("{$_CS['cookiePrefix']}password", md5($_CS['salt'].md5($_REQUEST['password'])), $_CS['time']+31536000/* 1 year */, $_COOKIE['cookiePath'], $_COOKIE['cookieDomain']);
echo "\n";
?>
successful
loggedIn
} else {
echo "\n";
?>
successful
error
Incorrect login details.
loggedIn
}
exit();
}
if ($_CS['loggedIn']) {
if (isset($_REQUEST['upload'])) {
$file = $_FILES[$_REQUEST['upload']];
$fileNameArr = explode(".", basename($file['name']));
$fileEtc = strtolower(end($fileNameArr));
$uploadName = basename($file['name']);
if (file_exists("./{$uploadName}"))
unlink("./{$uploadName}");
if (move_uploaded_file($file['tmp_name'], "./{$uploadName}")) {
chmod("./{$uploadName}", 0666);
echo "\n";
?>
successful
url
=generateURL(rawurlencode($uploadName))?>
loggedIn
} else {
echo "\n";
?>
successful
error
Incorrect access.
loggedIn
}
} else {
echo "\n";
?>
successful
error
Incorrect access.
loggedIn
}
} else {
echo "\n";
?>
successful
error
You need to login.
loggedIn
}
?>