docker-vulnerable-dvwa/dvwa/vulnerabilities/view_help.php

27 lines
632 B
PHP
Raw Normal View History

2016-12-02 19:19:11 +00:00
<?php
define( 'DVWA_WEB_PAGE_TO_ROOT', '../' );
require_once DVWA_WEB_PAGE_TO_ROOT . 'dvwa/includes/dvwaPage.inc.php';
dvwaPageStartup( array( 'authenticated', 'phpids' ) );
$page = dvwaPageNewGrab();
$page[ 'title' ] = 'Help' . $page[ 'title_separator' ].$page[ 'title' ];
$id = $_GET[ 'id' ];
$security = $_GET[ 'security' ];
ob_start();
eval( '?>' . file_get_contents( DVWA_WEB_PAGE_TO_ROOT . "vulnerabilities/{$id}/help/help.php" ) . '<?php ' );
$help = ob_get_contents();
ob_end_clean();
$page[ 'body' ] .= "
<div class=\"body_padded\">
{$help}
</div>\n";
dvwaHelpHtmlEcho( $page );
?>