#!/usr/bin/perl use strict; #use warnings; use DBI; my $all = (); my $EDO = (); my $comment = (); my $now = localtime(); my $result = (); my $dbargs = {AutoCommit => 0, PrintError => 1}; open (DATA, "@ARGV"); my $dbh = DBI->connect("dbi:SQLite:dbname=scan.db","","",$dbargs); while () { ($EDO) = /=EDO=([^=]+) Result=/ if /^=/; $all = $dbh->prepare("select comment FROM rr where EDO=\'$EDO\'"); $all->execute(); my $result = $all->fetchrow_hashref(); print; print "\nMitigation: $result->{comment}\n\n" if ( /^UNIX Checklist/ ); } close (DATA); $dbh->commit(); $dbh->disconnect(); __DATA__