-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathids_log.php
37 lines (24 loc) · 883 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
33
34
35
36
37
<?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' ] .= $page[ 'title_separator' ].'PHPIDS Log';
$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 );
?>