first commit
This commit is contained in:
parent
985a5c928c
commit
f40a84879c
551 changed files with 72374 additions and 24 deletions
12
dvwa/vulnerabilities/xss_r/source/high.php
Normal file
12
dvwa/vulnerabilities/xss_r/source/high.php
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
// Is there any input?
|
||||
if( array_key_exists( "name", $_GET ) && $_GET[ 'name' ] != NULL ) {
|
||||
// Get input
|
||||
$name = preg_replace( '/<(.*)s(.*)c(.*)r(.*)i(.*)p(.*)t/i', '', $_GET[ 'name' ] );
|
||||
|
||||
// Feedback for end user
|
||||
$html .= "<pre>Hello ${name}</pre>";
|
||||
}
|
||||
|
||||
?>
|
||||
18
dvwa/vulnerabilities/xss_r/source/impossible.php
Normal file
18
dvwa/vulnerabilities/xss_r/source/impossible.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
// Is there any input?
|
||||
if( array_key_exists( "name", $_GET ) && $_GET[ 'name' ] != NULL ) {
|
||||
// Check Anti-CSRF token
|
||||
checkToken( $_REQUEST[ 'user_token' ], $_SESSION[ 'session_token' ], 'index.php' );
|
||||
|
||||
// Get input
|
||||
$name = htmlspecialchars( $_GET[ 'name' ] );
|
||||
|
||||
// Feedback for end user
|
||||
$html .= "<pre>Hello ${name}</pre>";
|
||||
}
|
||||
|
||||
// Generate Anti-CSRF token
|
||||
generateSessionToken();
|
||||
|
||||
?>
|
||||
9
dvwa/vulnerabilities/xss_r/source/low.php
Normal file
9
dvwa/vulnerabilities/xss_r/source/low.php
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
// Is there any input?
|
||||
if( array_key_exists( "name", $_GET ) && $_GET[ 'name' ] != NULL ) {
|
||||
// Feedback for end user
|
||||
$html .= '<pre>Hello ' . $_GET[ 'name' ] . '</pre>';
|
||||
}
|
||||
|
||||
?>
|
||||
12
dvwa/vulnerabilities/xss_r/source/medium.php
Normal file
12
dvwa/vulnerabilities/xss_r/source/medium.php
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
// Is there any input?
|
||||
if( array_key_exists( "name", $_GET ) && $_GET[ 'name' ] != NULL ) {
|
||||
// Get input
|
||||
$name = str_replace( '<script>', '', $_GET[ 'name' ] );
|
||||
|
||||
// Feedback for end user
|
||||
$html .= "<pre>Hello ${name}</pre>";
|
||||
}
|
||||
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue