79554432

Date: 2025-04-04 04:02:35
Score: 0.5
Natty:
Report link

as i said in the comments, i tried this too but it doesn't work (as i said before, it is not possible to add the following script to the index page, this means that any script solution must be done on this check page)

index.php :

$nonce = 'n123'; //base64_encode(random_bytes(16));

check.php :

echo '<button type="button" id="btn" value="' . $_POST['username'] . ' : ' . $_POST['password'] . '">' . $_POST['username'] . '</button><script nonce="n123">document.getElementById("btn").addEventListener("click", function () { this.innerText = this.value; });</script>';
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: MSO