OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
knoblyExpressLandingPage
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
11/28/2024 11:03:35 AM
rwxrwxr-x
📄
about.php
2.06 KB
08/21/2024 10:01:12 AM
rw-r--r--
📁
assets
-
08/21/2024 10:01:17 AM
rwxr-xr-x
📄
blog.php
5.35 KB
08/21/2024 10:01:12 AM
rw-r--r--
📄
chatbot.html
1.86 KB
08/21/2024 10:01:12 AM
rw-r--r--
📄
chatbot.php
1.3 KB
08/21/2024 10:01:12 AM
rw-r--r--
📄
dashboard.php
788 bytes
08/21/2024 10:01:12 AM
rw-r--r--
📄
db.php
378 bytes
08/21/2024 10:01:12 AM
rw-r--r--
📄
footer.html
4.3 KB
08/21/2024 10:01:12 AM
rw-r--r--
📄
forgot-password-handler.php
7.12 KB
08/21/2024 10:01:13 AM
rw-r--r--
📄
forgot-password.php
4.52 KB
08/21/2024 10:01:13 AM
rw-r--r--
📁
includes
-
08/21/2024 10:01:14 AM
rwxr-xr-x
📄
index.php
12.59 KB
08/21/2024 10:01:13 AM
rw-r--r--
📄
login-handler.php
3.7 KB
08/21/2024 10:01:13 AM
rw-r--r--
📄
login.php
4.72 KB
08/21/2024 10:01:13 AM
rw-r--r--
📄
navbar.php
1.14 KB
08/21/2024 10:01:13 AM
rw-r--r--
📄
refundPolicy.php
5.99 KB
08/21/2024 10:01:13 AM
rw-r--r--
📄
reset-password-handler.php
4.01 KB
08/21/2024 10:01:13 AM
rw-r--r--
📄
reset-password.php
2.95 KB
08/21/2024 10:01:13 AM
rw-r--r--
📄
service.php
4.29 KB
08/21/2024 10:01:13 AM
rw-r--r--
📄
signup-handler.php
1.04 KB
08/21/2024 10:01:13 AM
rw-r--r--
📄
signup.php
5.98 KB
08/21/2024 10:01:14 AM
rw-r--r--
📄
usagePolicy.php
15.21 KB
08/21/2024 10:01:14 AM
rw-r--r--
📁
vendor
-
08/21/2024 10:01:26 AM
rwxr-xr-x
Editing: forgot-password-handler.php
Close
<?php use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; require 'vendor/autoload.php'; include 'db.php'; if ($_SERVER["REQUEST_METHOD"] == "POST") { $email = filter_var($_POST['forgotEmail'], FILTER_SANITIZE_EMAIL); if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { echo "Invalid email format."; exit; } // Check if the email exists in the users table $stmt = $conn->prepare("SELECT * FROM users WHERE email = ?"); $stmt->bind_param("s", $email); $stmt->execute(); $result = $stmt->get_result(); if ($result->num_rows > 0) { $user = $result->fetch_assoc(); // Check if 'name' exists in the array and set a default value if not $userName = isset($user['name']) ? $user['name'] : 'User'; $resetToken = bin2hex(random_bytes(32)); $resetTokenExpiry = date('Y-m-d H:i:s', strtotime('+1 hour')); // Update the user with the reset token and expiry $updateStmt = $conn->prepare("UPDATE users SET reset_token = ?, reset_token_expiry = ? WHERE email = ?"); $updateStmt->bind_param("sss", $resetToken, $resetTokenExpiry, $email); if ($updateStmt->execute()) { $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->Host = 'smtp.gmail.com'; $mail->SMTPAuth = true; $mail->Username = 'himanshupandeybhu4@gmail.com'; $mail->Password = 'wuse fluc kkpa nzdn'; $mail->SMTPSecure = 'tls'; $mail->Port = 587; // Email sender and recipient $mail->setFrom('support@knobly.com', 'Knobly Consulting LLP'); $mail->addAddress($email); // Email subject and body $mail->isHTML(true); $mail->Subject = 'Password Reset Request for Knobly Xpress'; // Enhanced HTML email template $mail->Body = ' <html> <head> <style> body { font-family: Arial, sans-serif; background-color: #f4f4f4; color: #333; margin: 0; padding: 0; } .email-container { max-width: 600px; background-color: #ffffff; border-radius: 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); padding: 20px; margin: 20px auto; border: 1px solid #e3e3e3; } .email-header { background-color: #0052cc; padding: 20px; text-align: center; color: white; border-radius: 10px 10px 0 0; } .email-header h1 { margin: 0; font-size: 24px; } .email-body { padding: 20px; font-size: 16px; line-height: 1.8; } .email-body a { display: inline-block; background-color: #0052cc; color: white; padding: 12px 25px; text-decoration: none; border-radius: 5px; margin: 20px 0; font-weight: bold; } .email-body a:hover { background-color: #0041a3; } .email-footer { font-size: 12px; text-align: center; color: #777; padding: 10px 0; border-top: 1px solid #e3e3e3; margin-top: 20px; } .email-footer a { color: #0052cc; text-decoration: none; } .email-footer a:hover { text-decoration: underline; } </style> </head> <body> <div class="email-container"> <div class="email-header"> <h1>Knobly Xpress</h1> </div> <div class="email-body"> <p>Dear ' . htmlspecialchars($user['full_name']) . ',</p> <p>We received a request to reset your Knobly Xpress account password. If you initiated this request, please click the link below to reset your password. This link will remain valid for 1 hour:</p> <a href="https://knoblycream.com/knoblyExpressLandingPage/reset-password.php?token=' . urlencode($resetToken) . '">Reset Password</a> <p>If you did not request a password reset, you can safely ignore this email. Your account will remain secure.</p> <p>If you have any questions or concerns, feel free to reach out to our support team at <a href="mailto:support@knobly.com">support@knobly.com</a>.</p> <p>Thank you,<br>The Knobly Xpress Team</p> </div> <div class="email-footer"> <p>© 2024 Knobly Consulting LLP. All rights reserved.</p> <p><a href="https://knoblycream.com">Visit our website</a></p> </div> </div> </body> </html> '; // Send the email $mail->send(); echo 'Password reset instructions have been sent to your email.'; } catch (Exception $e) { echo 'Message could not be sent. Mailer Error: ' . htmlspecialchars($mail->ErrorInfo); } } else { echo "Error updating record: " . htmlspecialchars($conn->error); } $updateStmt->close(); } else { echo "No user found with this email."; } $stmt->close(); } $conn->close(); ?>