From 7828f82f240383151cbfc9fac0ec1f67b772336f Mon Sep 17 00:00:00 2001 From: chonk Date: Wed, 22 Jan 2020 00:57:33 +0100 Subject: [PATCH] added testme.php for pentesting --- content/testme.php | 67 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 content/testme.php diff --git a/content/testme.php b/content/testme.php new file mode 100644 index 0000000..b89a421 --- /dev/null +++ b/content/testme.php @@ -0,0 +1,67 @@ +Error: Not all values populated.

"; + } + if ($_POST['password'] != $_POST['password_confirmation']) { + $error = true; + $error_message = "

Error: Password confirmation does not match password.

"; + } + if (!$error) { + $statement = $pdo->prepare('INSERT INTO users (name, authentication_string, authentication_salt, authentication_algorithm) VALUES (:name, :authentication_string, :authentication_salt, :authentication_algorithm)'); + $result = $statement->execute(array('name' => $_POST['name'], 'authentication_string' => hash($password_hash_method, $_POST['password'] . $random_salt), 'authentication_salt' => $random_salt, 'authentication_algorithm' => $password_hash_method)); + if (!$result) { + $error_message = "

Error: SQL error.

" . $statement->queryString . "
" . $statement->errorInfo()[2] . "
"; + } + } + } + } +?> + + + + LostCave Admin Page + + + +

Users

+ + + query($query) as $row) { + echo ""; + } + ?> +
User IDNameAuthentication algorithm
".$row['id']."".$row['name']."".$row['authentication_algorithm']."
+

Add user

+
+ + + + + +
+ +