Answer the question
In order to leave comments, you need to log in
How can I bypass password verification?
There is such a code with a loophole (sort of) to get the value of the password field from the form:
<?php
require 'flag.php';
if (isset ($_GET['password'])) {
if (ereg ("^[a-zA-Z0-9]+$", $_GET['password']) === FALSE)
echo '<p class="alert">You password must be alphanumeric</p>';
else if (strpos ($_GET['password'], '--') !== FALSE)
die('Flag: ' . $flag);
else
echo '<p class="alert">Wrong passsword</p>';
}
?>
Answer the question
In order to leave comments, you need to log in
Exploit null byte vulnerability
Add %00 to the end of the string. Everything after these characters will not be read regularly, but it will be possible to insert the necessary characters that match the condition for obtaining the flag
Solution task example.com/?password=pass%00--
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question