/
akruserg
/
mega-super-scaner-UI
Обзор
Документация
Войти
/
akruserg
/
mega-super-scaner-UI
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
test_php.php
59 строк
1 KB
akruserg
Align repo scanner and frontend rendering
16 май 2026, 11:43
16 май 2026, 11:43
f5dff25
Код
Авторство
О чём код?
<?php // Intentionally vulnerable demo file for local scanner testing only. ini_set("display_errors", 1); error_reporting(E_ALL); $dbHost = "127.0.0.1"; $dbUser = "root"; $dbPassword = "root"; $dbName = "demo_app"; $jwtSecret = "secret"; $conn = new mysqli($dbHost, $dbUser, $dbPassword, $dbName); if (isset($_GET["user"])) { $user = $_GET["user"]; $sql = "SELECT id, username, password FROM users WHERE username = '$user'"; $result = $conn->query($sql); var_dump($result); } if (isset($_GET["page"])) { include($_GET["page"]); } if (isset($_GET["file"])) { echo file_get_contents($_GET["file"]); } if (isset($_POST["path"]) && isset($_POST["content"])) { file_put_contents($_POST["path"], $_POST["content"]); echo "saved"; } if (isset($_FILES["upload"])) { $name = $_FILES["upload"]["name"]; move_uploaded_file($_FILES["upload"]["tmp_name"], __DIR__ . "/uploads/" . $name . ".php"); echo "uploaded"; } if (isset($_GET["target"])) { header("Location: " . $_GET["target"]); exit; } if (isset($_GET["cmd"])) { echo shell_exec($_GET["cmd"]); } if (isset($_GET["token"])) { print "api_key=" . $jwtSecret . " token=" . $_GET["token"]; } if (isset($_GET["make_code"])) { $resetCode = mt_rand(100000, 999999); echo $resetCode; } echo "password=" . $dbPassword;