im trying to make a log scanner to check my daily NT Webserver logs, i
have compiled a 179 https request hit list to use as a config file which
i have named vuln.cfg. my question is : somehow i need to set the
pattern match to a variable so it reads every line in the vuln.cfg and
compares it to the logfile. i hope this is not confusing.

here is the code snip:

any ideas would be great. thanks and merry X-mas to all Luggers.

# vuln_check sub call
 sub vuln_check() {
     my ($logfile) = @_;
     #lets check for someone being nosy here... .
     print"Starting Check:\n";
     print"---------------\n";
     open(LOGFILE, "$logfile")
                || die "Cannot open $logfile $!";
     while($logentry = <LOGFILE>) {
  open(VULNDEF, "$vulndef")
                 || die "Cannot open $vulndef: $!";
  while($vuln = <VULNDEF>) {
      ($vuln =~ /^\#/) && next;
      $quotedvuln = quotemeta $vuln;     <------------------ right here
is the problem and im not sure how to get out of it.
      ($logentry =~ /$quotedvuln/) && printToLog($logentry);
  }
  close(VULNDEF);
#  print ".";
     }
     close(LOGFILE);
 }

-D


**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to