[Dshield] Better Perl script (iptables)

Dan Crooks dcrooks at succeed.net
Tue Aug 28 20:16:57 GMT 2001


>> Message: 1
>> From: Mike Watson <mike at prog99.com>
>> To: dshield at dshield.org
>> Subject: Re: [Dshield] Better Perl script (iptables)
>> Date: Mon, 27 Aug 2001 18:03:03 +0100
>> Organization: Prog99 ltd
>> Reply-To: dshield at dshield.org
>>
>> On Mon, 27 Aug 2001 02:31:27 -0700, you wrote:
>>
>> >When attempting to run this client I receive the following error:
>> >
>> >Can't call method "ctime" on an undefined value at ./dshield_iptables.pl
>> >line 122.
>> >
>> >lines 120-125:
>> >
>> >120> $roll_date = 0;
>> >121> $stat=stat($rolllogfile);
>> >122> $roll_date=$stat->ctime;
>> >123> if ($roll_date >= $last_date) {
>> >124>        parselog ($rolllogfile, $last_date, $tmp);
>> >125> }
>> >
>> >Help...
>> Check the names of your rolling log files. I'd hazard a guess they
>> dont match what the perl script expects. /var/log/messages.1 I think.

Thanks Mike.  As it turned out, the machine hadn't rolled the logs
yet and there wasn't a /var/log/messages.1 file.  I touched the file and
re-ran the script and, after commenting out the $local_log line (used only
once) it ran fine.




More information about the list mailing list