[Dshield] Fix to Linux script
Joe Wilson
Joe.Wilson at logictier.com
Mon Dec 4 17:01:48 GMT 2000
Anyone using the script which Johannes has generously called the "better"
Perl script, probably discovered a bug in the regexp that parses the date
information out of each line in the parselog subroutine. It seems that
syslog doesn't prepend a zero on single digit day numbers but prepends a
space. Below is the old and new regexp to fix this problem.
Old (broken):
$line =~ /(.*?) (.*?) (.*?):(.*?):(.*?) /;
New (works):
$line =~ /(.*?) ?(.*?) (.*?):(.*?):(.*?) /;
J
*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*
*#
*# Joe Wilson LogicTier
*# (703) 623-2121 (C) Director, Research
*# (703) 796-5112 (W) 460 Herndon Parkway #250, Herndon, VA 20170
*#
*# He who can no longer pause to wonder and stand rapt in awe,
*# is as good as dead; his eyes are closed. --Albert Einstein
*#
*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*
More information about the list
mailing list