Line | |
---|
1 | #! /usr/local/bin/php
|
---|
2 | <?php
|
---|
3 | header("Content-type: text/xml; charset=iso-8859-1");
|
---|
4 |
|
---|
5 | /* IF YOU ARE USING MOD_PHP, DELETE FIRST LINE (#! /usr/...)
|
---|
6 | * ELSE: SET CORRECT PATH TO PHP
|
---|
7 | */
|
---|
8 |
|
---|
9 | echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n";
|
---|
10 | echo "<!DOCTYPE samhain SYSTEM \"samhain.dtd\">\n";
|
---|
11 | echo "<?xml-stylesheet type=\"text/xsl\" href=\"samhain.xsl\" ?>\n";
|
---|
12 | echo "\n";
|
---|
13 | echo "<logs>\n";
|
---|
14 | $machine = $HTTP_POST_VARS["machine"];
|
---|
15 | print "<req_machine>$machine</req_machine>\n";
|
---|
16 | $date = $HTTP_POST_VARS["date"];
|
---|
17 | print "<req_date>$date</req_date>\n";
|
---|
18 |
|
---|
19 | /* INSERT PATH TO YOUR LOGFILE !!!
|
---|
20 | */
|
---|
21 | readfile("/var/log/yule/yule.log");
|
---|
22 |
|
---|
23 | /* INSERT PATH TO YOUR PID FILE !!!
|
---|
24 | * The final </trail> is only written when the
|
---|
25 | * daemon exits, threfore we need to supply it here.
|
---|
26 | */
|
---|
27 | if (TRUE == file_exists("/var/run/yule.pid")) {
|
---|
28 | echo "</trail>\n";
|
---|
29 | fi
|
---|
30 |
|
---|
31 | echo "</logs>\n";
|
---|
32 | ?>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.