Acid Amygdala has asked for the wisdom of the Perl Monks concerning the following question:
And here is my code:Time: 10/31-13:36:10.802641 event_ref: 0 (portscan) TCP Portsweep Priority Count: 5 Connection Count: 8 IP Count: 13 Scanned IP Range: Port/Proto Count: 3 Port/Proto Range: 22:3389 Time: 10/31-13:37:58.075795 event_ref: 0 (portscan) TCP Portsweep Priority Count: 5 Connection Count: 9 IP Count: 13 Scanned IP Range: Port/Proto Count: 3 Port/Proto Range: 25:3389 Time: 10/31-13:38:10.031849 event_ref: 0 (portscan) ICMP Sweep Priority Count: 5 Connection Count: 13 IP Count: 12 Scanned IP Range: Port/Proto Count: 0 Port/Proto Range: 0:0
Also, if you know of any websites that could help me with this, that would be greatly appreciated as well. Thanks so much for your time and help.use warnings; use Win32::GUI(); use Win32::Sound; use diagnostics; $filename="log3.txt"; open(TXT, $filename)||die("Could not open file!"); @filedata = <TXT>; close(TXT); @alert = ['a'..'z']; $i=0, $p=1; foreach $element (@filedata) { if($element =~ /(\s+)(\d{1,4})(\.\d{1,4}){3}(\s+)/) { &Build_Window; } ++$i; ++$p; } open (TXT, ">$filename"); close TXT; sub Build_Window { $datetime = localtime(); $alert[$i] = new Win32::GUI::Window(-name => "Alert", -width = +> 500, -height => 150, -pos => [$p*2, $p*2]); $font = Win32::GUI::Font -> new(-name => "Arial", size => 46, +-bold => 1); $alert[$i] -> AddLabel(-text => $datetime, -font => $font); $alert[$i] -> AddLabel(-text => "SNORT ALERT: MALICIOUS BEHAVI +OR DETECTED!", -font => $font, -top => 50); $alert[$i] -> AddLabel(-text => $element, -font => $font, -top + => 75); my $t1 = $alert[$i] -> AddTimer('T1', 1000); Win32::Sound::Play("SystemExclamation"); $alert[$i] -> Show(); Win32::GUI::Dialog(); sub T1_Timer { while(@filedata){return -1;} } sub Alert_Terminate { return 1; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32 GUI Window Problem
by BrowserUk (Patriarch) on Jan 24, 2009 at 00:55 UTC | |
by Acid Amygdala (Novice) on Jan 26, 2009 at 00:50 UTC | |
by Acid Amygdala (Novice) on Jan 27, 2009 at 00:57 UTC | |
by Acid Amygdala (Novice) on Jan 28, 2009 at 02:13 UTC | |
by BrowserUk (Patriarch) on Jan 28, 2009 at 05:51 UTC | |
| |
by Marshall (Canon) on Jan 28, 2009 at 05:28 UTC | |
|
Re: Win32 GUI Window Problem
by jplindstrom (Monsignor) on Jan 28, 2009 at 13:43 UTC |