Hello Guest! please use in Admin!
<?php
include('config.php');
function encode($string, $key) {
$result = null;
for ($i = 0; $i < strlen($string); $i++) {
$char = substr($string, $i, 1);
$keychar = substr($key, ($i % strlen($key)) - 1, 1);
$char = chr(ord($char) + ord($keychar));
$result.=$char;
}
$result = base64_encode($result);
return $result;
}
function decode($string, $key) {
$result = null;
$string = base64_decode($string);
for ($i = 0; $i < strlen($string); $i++) {
$char = substr($string, $i, 1);
$keychar = substr($key, ($i % strlen($key)) - 1, 1);
$char = chr(ord($char) - ord($keychar));
$result.=$char;
}
return $result;
}
@$username = decode($_COOKIE['user'], $key);
if ($username == 'system') {
echo $flag;
}else{
setcookie('user',encode('guest', $key));
echo "Hello Guest! please use in Admin!<br>";
}
show_source(__FILE__);
?>
|