forked from digininja/DVWA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ids_log.php
32 lines (22 loc) · 895 Bytes
/
ids_log.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
define( 'DVWA_WEB_PAGE_TO_ROOT', '' );
require_once DVWA_WEB_PAGE_TO_ROOT . 'dvwa/includes/dvwaPage.inc.php';
define( 'DVWA_WEB_ROOT_TO_PHPIDS_LOG', 'external/phpids/' . dvwaPhpIdsVersionGet() . '/lib/IDS/tmp/phpids_log.txt' );
define( 'DVWA_WEB_PAGE_TO_PHPIDS_LOG', DVWA_WEB_PAGE_TO_ROOT.DVWA_WEB_ROOT_TO_PHPIDS_LOG );
dvwaPageStartup( array( 'authenticated', 'phpids' ) );
$page = dvwaPageNewGrab();
$page[ 'title' ] = 'PHPIDS Log' . $page[ 'title_separator' ].$page[ 'title' ];
$page[ 'page_id' ] = 'log';
// $page[ 'clear_log' ]; <- Was showing error.
$page[ 'body' ] .= "
<div class=\"body_padded\">
<h1>PHPIDS Log</h1>
<p>" . dvwaReadIdsLog() . "</p>
<br /><br />
<form action=\"#\" method=\"GET\">
<input type=\"submit\" value=\"Clear Log\" name=\"clear_log\">
</form>
" . dvwaClearIdsLog() . "
</div>";
dvwaHtmlEcho( $page );
?>