On Friday 05 September 2008 6:14 pm, Dave M wrote: > > } elsif (($virus) = ($log =~ /^stream(?: \d+)?: (.+) FOUND/ )) { > > > > I 'think' the issue is that the ip and port have been added to the log: > > > > Fri Sep 5 03:31:14 2008 -> stream([EMAIL PROTECTED]): > > Email.Scam4.Gen668.Sanesecurity.07050106.UNOFFICIAL FOUND > > > > I 'assume' that is the port number after the @? Anyway what change would > > need to be made to the line above to have it show the found virus? > > Just a stab in the dark here, but try this: > > } elsif (($virus) = ($string =~ /^stream[^:]+: (.+) FOUND/ )) { > > It doesn't appear you're trying to match anything between stream and > the virus, so just ignore it with the "[^:]". It works for me with a > sample script, but your mileage may vary. > > Dave M
Thanks Dave but that didn't seem to do the trick: /usr/local/bin/clamstats.pl --html > /home/chris/clamstuff/mystats.html Global symbol "$string" requires explicit package name at /usr/local/bin/clamstats.pl line 158. Execution of /usr/local/bin/clamstats.pl aborted due to compilation errors. However, taking a chance I changed $string to $log and it worked like it should: -------------------------------------------------------- clamd last started Thu Sep 4 21:25:49 2008 -------------------------------------------------------- Statistics since 04 September 2008 Last Database Update Fri Sep 5 18:08:51 2008 -------------------------------------------------------- Total viruses detected 7 Total Database Signatures 414,127 6 Virus Types Detected ------------------------------------------ Email.Spam.Sanesecurity.Url_1441.UNOFFICIAL 2 28.57% Email.Spam.Gen903.Sanesecurity.07062812.UNOFFICIAL 1 14.29% Email.Scam4.Gen054.Sanesecurity.06060611.UNOFFICIAL 1 14.29% Email.Malware.Sanesecurity.08081803.UNOFFICIAL 1 14.29% Email.Scam4.Gen668.Sanesecurity.07050106.UNOFFICIAL 1 14.29% Email.Scam4.Gen1891.Sanesecurity.080625128.UNOFFICIAL 1 14.29% 1 File Extensions Used -------------------------- N/A 7 100.00% By Date ( . = 1 viruses ) -------------------------- Sep 04: 1 . Sep 05: 6 ...... By Hour ( . = 1 viruses ) -------------------------- 1: 1 . 3: 1 . 5: 1 . 8: 1 . 9: 1 . 13: 1 . 21: 1 . By Month ( . = 1 viruses ) ------------------------- Sep: 7 ....... By Year ( . = 1 viruses ) -------------------------- 2008: 7 ....... -- Chris KeyID 0xE372A7DA98E6705C
pgpInfCzaEmDT.pgp
Description: PGP signature
_______________________________________________ Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net http://www.clamav.net/support/ml