Skip to content
Snippets Groups Projects
Commit a4a37951 authored by Tomáš Plesník's avatar Tomáš Plesník
Browse files

pwd zjistovana pomoci modulu FindBin; smazany zakomentovane casti kodu;...

pwd zjistovana pomoci modulu FindBin; smazany zakomentovane casti kodu; timeout a priority nastaveny na undef
parent dacda6b4
Branches
Tags
No related merge requests found
......@@ -9,20 +9,13 @@ use warnings;
use Switch;
use DateTime;
use File::Basename;
use FindBin qw($RealBin);
FindBin::again();
my $bin = File::Basename::dirname(__FILE__);
use lib "$bin/../lib";
use lib "$RealBin/../lib";
use WardenClient;
my $service = "test";
# service is needed in authorization process of the client,
# therefore it can not be set randomly
#switch (int(rand(3) + 0.5)) {
# case 1 { $service = 'ScanDetector'; }
# case 2 { $service = 'PhiGaro'; }
# case 3 { $service = 'HoneyScan'; }
# }
my $detected = DateTime->from_epoch(epoch => time());
......@@ -67,31 +60,26 @@ switch (int(rand(6) + 0.5)) {
my $attack_scale = (int(rand(100000) + 0.5) + 1000);
my $note = "tohle je takova normalni jednoducha poznamka";
my $note = "This is simple note only.";
my $priority = int(rand(255) + 0.5);
my $timeout = int(rand(255) + 0.5);
my $priority = undef;
my $timeout = undef;
my @event = (
$service, # $service
"$detected", # $detected
$type, # $type
$source_type, # $source_type
$source, # $source
$target_proto, # $target_proto
$target_port, # $target_port
$attack_scale, # $attack_scale
$note, # $note
$priority, # $priority
$timeout, # $timeout
$service,
$detected,
$type,
$source_type,
$source,
$target_proto,
$target_port,
$attack_scale,
$note,
$priority,
$timeout,
);
WardenClient::saveNewEvent(\@event);
#foreach (@event) {
# print "$_\n";
#}
exit 0;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment