#! perl -slw use strict; use Win32::GUI(); use Win32::Sound; my $filename="yourfile.dat"; open(TXT, $filename)||die("Could not open file!"); my @filedata = ; close(TXT); my( $running, @alerts ) = 0; my $p = 100; for my $element ( @filedata ) { if( $element =~ /(\s+)(\d{1,4})(\.\d{1,4}){3}(\s+)/) { push @alerts, Build_Window( $element, $p += 10 ); ++$running; } } sub Alert_Terminate { return --$running ? 1 : -1; } sub Build_Window { my( $element, $pos ) = @_; my $win = new Win32::GUI::Window( -name => "Alert", -width => 500, -height => 150, -pos => [ $pos, $pos ] ); my $font = Win32::GUI::Font->new( -name => "Arial", size => 46, -bold => 1 ); $win->AddLabel(-text => localtime(), -font => $font); $win->AddLabel( -text => "SNORT ALERT: MALICIOUS BEHAVIOR DETECTED!", -font => $font, -top => 50 ); $win->AddLabel(-text => $element, -font => $font, -top => 75); Win32::Sound::Play("SystemExclamation"); $win->Show(); return $win; } Win32::GUI::Dialog();