aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-04-15 11:10:52 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-04-15 11:10:52 -0300
commitb79bb10806852ed4dccbe33e7c243bdc2ab4e23a (patch)
tree45e0c6d8842d15b84e111dc18d003fca87df0e1d /config
parent557608e757b2bdfd27f0f1cb71efdcc584937c9a (diff)
parent4a4d2dcb20351e948c31a2b4bb760d2440ae2ab7 (diff)
downloadpfsense-packages-b79bb10806852ed4dccbe33e7c243bdc2ab4e23a.tar.gz
pfsense-packages-b79bb10806852ed4dccbe33e7c243bdc2ab4e23a.tar.bz2
pfsense-packages-b79bb10806852ed4dccbe33e7c243bdc2ab4e23a.zip
Merge pull request #858 from dneuhaeuser/patch-1
Diffstat (limited to 'config')
-rw-r--r--config/squid3/34/squid_clwarn.php1
-rwxr-xr-xconfig/squid3/34/squid_monitor.php22
-rwxr-xr-xconfig/squid3/34/squid_monitor_data.php28
3 files changed, 50 insertions, 1 deletions
diff --git a/config/squid3/34/squid_clwarn.php b/config/squid3/34/squid_clwarn.php
index 0bd97d58..8de016f3 100644
--- a/config/squid3/34/squid_clwarn.php
+++ b/config/squid3/34/squid_clwarn.php
@@ -56,6 +56,7 @@ $vr[1]="";
$virus = preg_replace($vp,$vr,$virus);
+error_log(date("Y-m-d H:i:s")." | VIRUS FOUND | ".$virus." | ".$url." | ".$source." | ".$user."\n", 3, "/var/log/c-icap/virus.log");
?>
<style type="text/css">
diff --git a/config/squid3/34/squid_monitor.php b/config/squid3/34/squid_monitor.php
index 84bf08e9..60a366fc 100755
--- a/config/squid3/34/squid_monitor.php
+++ b/config/squid3/34/squid_monitor.php
@@ -92,7 +92,7 @@ include("head.inc");
$tab_array[] = array(gettext("General"), false, "/pkg_edit.php?xml=squid.xml&amp;id=0");
$tab_array[] = array(gettext("Remote Cache"), false, "/pkg.php?xml=squid_upstream.xml");
$tab_array[] = array(gettext("Local Cache"), false, "/pkg_edit.php?xml=squid_cache.xml&amp;id=0");
- $tab_array[] = array(gettext("Antivirus"), false, "/pkg_edit.php?xml=antivirus.xml&amp;id=0");
+ $tab_array[] = array(gettext("Antivirus"), false, "/pkg_edit.php?xml=squid_antivirus.xml&amp;id=0");
$tab_array[] = array(gettext("ACLs"), false, "/pkg_edit.php?xml=squid_nac.xml&amp;id=0");
$tab_array[] = array(gettext("Traffic Mgmt"), false, "/pkg_edit.php?xml=squid_traffic.xml&amp;id=0");
$tab_array[] = array(gettext("Authentication"), false, "/pkg_edit.php?xml=squid_auth.xml&amp;id=0");
@@ -184,6 +184,26 @@ include("head.inc");
</tr>
</tbody>
</table>
+ <!-- clamav Table -->
+ <table width="100%" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <td>
+ <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td colspan="6" class="listtopic"><center><?=gettext("clamav Logs"); ?><center></td>
+ </tr>
+ <tbody id="clamView">
+ <script language="JavaScript">
+ // Call function to show squidGuard log
+ showLog('clamView', 'squid_monitor_data.php','clamav');
+ </script>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+ </table>
</div>
<?php }?>
</td>
diff --git a/config/squid3/34/squid_monitor_data.php b/config/squid3/34/squid_monitor_data.php
index 6223330e..9010f0a2 100755
--- a/config/squid3/34/squid_monitor_data.php
+++ b/config/squid3/34/squid_monitor_data.php
@@ -113,6 +113,34 @@ if ($_POST) {
echo "</tr>\n";
}
break;
+ case 'clamav';
+ // Define log file
+ $log='/var/log/c-icap/virus.log';
+ //show table headers
+ show_tds(array("Date-Time","Message","Virus","URL","Host","User"));
+ //fetch lines
+ $logarr=fetch_log($log);
+ foreach ($logarr as $logent) {
+ // Split line by space delimiter
+ $logline = preg_split("/\|/", $logent);
+
+ // Apply time format
+ $logline[0] = date("d.m.Y H:i:s", strtotime($logline[0]));
+
+ // Word wrap the URL
+ $logline[3] = htmlentities($logline[3]);
+ $logline[3] = html_autowrap($logline[3]);
+
+ echo "<tr>\n";
+ echo "<td class=\"listlr\" nowrap>{$logline[0]}</td>\n";
+ echo "<td class=\"listr\" nowrap>{$logline[1]}</td>\n";
+ echo "<td class=\"listr\">{$logline[2]}</td>\n";
+ echo "<td class=\"listr\">{$logline[3]}</td>\n";
+ echo "<td class=\"listr\">{$logline[4]}</td>\n";
+ echo "<td class=\"listr\">{$logline[5]}</td>\n";
+ echo "</tr>\n";
+ }
+ break;
}
}