Server IP : 68.178.168.24 / Your IP : 3.147.68.89 Web Server : Apache System : Linux 24.168.178.68.host.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els19.x86_64 #1 SMP Mon Mar 31 17:29:00 UTC 2025 x86_64 User : realcarecert ( 1247) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/realcarecert/public_html/ |
Upload File : |
<?php $correct_flag = "FLAG{abc123}"; $flag_verified = false; $error = ""; // Database connection $host = 'localhost'; $dbname = 'realcarecert_real'; $username = 'realcarecert_real'; $password = '0T~4Pojo{a?m'; // your MySQL password $conn = new mysqli($host, $username, $password, $dbname); if ($conn->connect_error) { die("Database connection failed: " . $conn->connect_error); } if ($_SERVER["REQUEST_METHOD"] == "POST") { if (isset($_POST['flag'])) { if ($_POST['flag'] === $correct_flag) { $flag_verified = true; } else { $error = "Incorrect flag!"; } } elseif (isset($_POST['codename']) && isset($_POST['verified']) && $_POST['verified'] === "1") { $codename = trim($_POST['codename']); $stmt = $conn->prepare("INSERT INTO solvers (codename) VALUES (?)"); $stmt->bind_param("s", $codename); $stmt->execute(); $stmt->close(); $conn->close(); header("Location: solvers.php"); exit(); } } ?> <!DOCTYPE html> <html> <head> <title>Flag Input</title> </head> <body> <?php if (!$flag_verified): ?> <h2>Enter Flag</h2> <form method="post"> <input type="text" name="flag" required> <input type="submit" value="Submit Flag"> <br> <br> <a href="solvers.php">Solvers</a> </form> <p style="color:red;"><?php echo $error; ?></p> <?php else: ?> <h2>Flag Correct! Enter Codename</h2> <form method="post"> <input type="hidden" name="verified" value="1"> <input type="text" name="codename" required> <input type="submit" value="Submit Codename"> </form> <?php endif; ?> </body> </html>Private