dvwa updated
This commit is contained in:
parent
8f3c3af4fb
commit
c37af6fc80
84 changed files with 1873 additions and 605 deletions
23
dvwa/vulnerabilities/csp/source/impossible.php
Normal file
23
dvwa/vulnerabilities/csp/source/impossible.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
$headerCSP = "Content-Security-Policy: script-src 'self';";
|
||||
|
||||
header($headerCSP);
|
||||
|
||||
?>
|
||||
<?php
|
||||
if (isset ($_POST['include'])) {
|
||||
$page[ 'body' ] .= "
|
||||
" . $_POST['include'] . "
|
||||
";
|
||||
}
|
||||
$page[ 'body' ] .= '
|
||||
<form name="csp" method="POST">
|
||||
<p>Unlike the high level, this does a JSONP call but does not use a callback, instead it hardcodes the function to call.</p><p>The CSP settings only allow external JavaScript on the local server and no inline code.</p>
|
||||
<p>1+2+3+4+5=<span id="answer"></span></p>
|
||||
<input type="button" id="solve" value="Solve the sum" />
|
||||
</form>
|
||||
|
||||
<script src="source/impossible.js"></script>
|
||||
';
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue