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

finalni upravy pro vydani balicku warden-client-2.0

parent e3a3ce3b
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,7 @@ err() ...@@ -27,7 +27,7 @@ err()
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# edit when you build new package # edit when you build new package
version="2.0.0-beta2" version="2.0"
package_name="warden-client" package_name="warden-client"
package="${package_name}-${version}" package="${package_name}-${version}"
......
...@@ -3,34 +3,8 @@ ...@@ -3,34 +3,8 @@
# receiver.pl # receiver.pl
# #
# Copyright (C) 2011-2012 Cesnet z.s.p.o # Copyright (C) 2011-2012 Cesnet z.s.p.o
# Author(s): Tomas PLESNIK <plesnik@ics.muni.cz>
# Jan SOUKAL <soukal@ics.muni.cz>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the Cesnet z.s.p.o nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# This software is provided ``as is'', and any express or implied
# warranties, including, but not limited to, the implied warranties of
# merchantability and fitness for a particular purpose are disclaimed.
# In no event shall the Cesnet z.s.p.o or contributors be liable for
# any direct, indirect, incidental, special, exemplary, or consequential
# damages (including, but not limited to, procurement of substitute
# goods or services; loss of use, data, or profits; or business
# interruption) however caused and on any theory of liability, whether
# in contract, strict liability, or tort (including negligence or
# otherwise) arising in any way out of the use of this software, even
# if advised of the possibility of such damage.
# #
# Use of this source is governed by a BSD-style license, see LICENSE file.
use strict; use strict;
......
...@@ -3,34 +3,8 @@ ...@@ -3,34 +3,8 @@
# sender.pl # sender.pl
# #
# Copyright (C) 2011-2012 Cesnet z.s.p.o # Copyright (C) 2011-2012 Cesnet z.s.p.o
# Author(s): Tomas PLESNIK <plesnik@ics.muni.cz>
# Jan SOUKAL <soukal@ics.muni.cz>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the Cesnet z.s.p.o nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# This software is provided ``as is'', and any express or implied
# warranties, including, but not limited to, the implied warranties of
# merchantability and fitness for a particular purpose are disclaimed.
# In no event shall the Cesnet z.s.p.o or contributors be liable for
# any direct, indirect, incidental, special, exemplary, or consequential
# damages (including, but not limited to, procurement of substitute
# goods or services; loss of use, data, or profits; or business
# interruption) however caused and on any theory of liability, whether
# in contract, strict liability, or tort (including negligence or
# otherwise) arising in any way out of the use of this software, even
# if advised of the possibility of such damage.
# #
# Use of this source is governed by a BSD-style license, see LICENSE file.
use Switch; use Switch;
use strict; use strict;
......
2012-07-20 v.2.0.0-beta2 2nd beta version of warden-client-2.0.0 2012-07-27 v.2.0 stable version and bugfix release of warden-client-2.0.0-beta
---------------------------------------------------------------- ------------------------------------------------------------------------------
- Sender client code fixed, so that it will not terminate "parent" - Sender client code fixed, so that it will not terminate "parent"
application when crashed application when crashed
2012-05-10 v.2.0.0-beta beta version of warden-client-2.0.0 2012-05-10 v.2.0.0-beta beta version of warden-client-2.0.0
----------------------------------------------------------- -----------------------------------------------------------
- Changed communication with server: HTTP layer added (compatible with - Changed communication with server: HTTP layer added (compatible with
......
+------------------------------------+ +----------------------------+
| README - Warden Client 2.0.0-beta2 | | README - Warden Client 2.0 |
+------------------------------------+ +----------------------------+
Content Content
...@@ -30,7 +30,7 @@ A. Overall Information ...@@ -30,7 +30,7 @@ A. Overall Information
2. Version 2. Version
2.0.0-beta2 (2012-07-20) 2.0 (2012-07-27)
3. Package structure 3. Package structure
...@@ -58,7 +58,7 @@ B. Installation Dependencies ...@@ -58,7 +58,7 @@ B. Installation Dependencies
Perl >= 5.10.1 Perl >= 5.10.1
SOAP::Lite >= 0.712 SOAP::Lite >= 0.712
IO::Socket::SSL >= 1.33 IO::Socket::SSL >= 1.74
SOAP::Transport::HTTP >= 0.712 SOAP::Transport::HTTP >= 0.712
FindBin >= 1.50 FindBin >= 1.50
DateTime >= 0.61 DateTime >= 0.61
...@@ -69,11 +69,11 @@ C. Installation (First installation of the Warden client package) ...@@ -69,11 +69,11 @@ C. Installation (First installation of the Warden client package)
1. Check SHA1 checksum of corresponding Warden client package archive 1. Check SHA1 checksum of corresponding Warden client package archive
$ sha1sum -c warden-client-2.0.0-beta2.tar.gz.sig $ sha1sum -c warden-client-2.0.tar.gz.sig
2. Untar it 2. Untar it
$ tar xzvf warden-client-2.0.0-beta2.tar.gz $ tar xzvf warden-client-2.0.tar.gz
3. Run install.sh 3. Run install.sh
...@@ -129,11 +129,11 @@ D. Update (Update of previously installed the Warden client package) ...@@ -129,11 +129,11 @@ D. Update (Update of previously installed the Warden client package)
1. Check SHA1 checksum of corresponding the Warden client package archive 1. Check SHA1 checksum of corresponding the Warden client package archive
$ sha1sum -c warden-client-2.0.0-beta2.tar.gz.sig $ sha1sum -c warden-client-2.0.tar.gz.sig
2. Untar it 2. Untar it
$ tar xzvf warden-client-2.0.0-beta2.tar.gz $ tar xzvf warden-client-2.0.tar.gz
3. Run update.sh 3. Run update.sh
......
+-------------------------------------------+ +-----------------------------------+
| README.cesnet - Warden Client 2.0.0-beta2 | | README.cesnet - Warden Client 2.0 |
| | | |
| CESNET Specifics | | CESNET Specifics |
+-------------------------------------------+ +-----------------------------------+
Content Content
...@@ -26,7 +26,7 @@ A. Overall Information ...@@ -26,7 +26,7 @@ A. Overall Information
2. Version 2. Version
2.0.0-beta2 (2012-07-20) 2.0 (2012-07-27)
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
B. Registration B. Registration
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
use strict; use strict;
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Warden 1.2.0. Client, Receiver, Example # Warden 2.0 Client, Receiver, Example
# #
# Simple use of warden-client receiver functionality to download new events # Simple use of warden-client receiver functionality to download new events
# from # Warden server. This code illustrates how to integrate warden-client # from # Warden server. This code illustrates how to integrate warden-client
......
...@@ -8,7 +8,7 @@ use strict; ...@@ -8,7 +8,7 @@ use strict;
use DateTime; use DateTime;
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Warden 1.2.0. Client, Sender, Example # Warden 2.0. Client, Sender, Example
# #
# Sample script using warden-client sending functionality. This example is not # Sample script using warden-client sending functionality. This example is not
# intended to be a standalone script. It only shows how to use warden-client # intended to be a standalone script. It only shows how to use warden-client
......
warden-client-2.0.0-beta2 warden-client-2.0
...@@ -14,7 +14,7 @@ use IO::Socket::SSL qw(debug1); ...@@ -14,7 +14,7 @@ use IO::Socket::SSL qw(debug1);
use SOAP::Transport::HTTP; use SOAP::Transport::HTTP;
use FindBin; use FindBin;
our $VERSION = "2.0"; #first iteration after 'port to Apache' our $VERSION = "2.0";
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# errMsg - print error message and die # errMsg - print error message and die
...@@ -31,12 +31,12 @@ sub errMsg ...@@ -31,12 +31,12 @@ sub errMsg
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
sub c2s sub c2s
{ {
my $uri = shift; my $uri = shift;
my $ssl_key_file = shift; my $ssl_key_file = shift;
my $ssl_cert_file = shift; my $ssl_cert_file = shift;
my $ssl_ca_file = shift; my $ssl_ca_file = shift;
my $method = shift; my $method = shift;
my $data = shift; my $data = shift;
my $client; my $client;
my ($server, $port, $service) = $uri =~ /https:\/\/(.+)\:(\d+)\/(.+)/; my ($server, $port, $service) = $uri =~ /https:\/\/(.+)\:(\d+)\/(.+)/;
...@@ -76,8 +76,6 @@ sub c2s ...@@ -76,8 +76,6 @@ sub c2s
} }
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# getNewEvents - get new events from warden server greater than last received ID # getNewEvents - get new events from warden server greater than last received ID
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
...@@ -140,19 +138,19 @@ sub getNewEvents ...@@ -140,19 +138,19 @@ sub getNewEvents
my @event; my @event;
# parse items of one event # parse items of one event
$id = $response_data->{'ID'}; $id = $response_data->{'ID'};
$hostname = $response_data->{'HOSTNAME'}; $hostname = $response_data->{'HOSTNAME'};
$service = $response_data->{'SERVICE'}; $service = $response_data->{'SERVICE'};
$detected = $response_data->{'DETECTED'}; $detected = $response_data->{'DETECTED'};
$type = $response_data->{'TYPE'}; $type = $response_data->{'TYPE'};
$source_type = $response_data->{'SOURCE_TYPE'}; $source_type = $response_data->{'SOURCE_TYPE'};
$source = $response_data->{'SOURCE'}; $source = $response_data->{'SOURCE'};
$target_proto = $response_data->{'TARGET_PROTO'}; $target_proto = $response_data->{'TARGET_PROTO'};
$target_port = $response_data->{'TARGET_PORT'}; $target_port = $response_data->{'TARGET_PORT'};
$attack_scale = $response_data->{'ATTACK_SCALE'}; $attack_scale = $response_data->{'ATTACK_SCALE'};
$note = $response_data->{'NOTE'}; $note = $response_data->{'NOTE'};
$priority = $response_data->{'PRIORITY'}; $priority = $response_data->{'PRIORITY'};
$timeout = $response_data->{'TIMEOUT'}; $timeout = $response_data->{'TIMEOUT'};
# push new event from warden server into @events which is returned # push new event from warden server into @events which is returned
@event = ($id, $hostname, $service, $detected, $type, $source_type, $source, $target_proto, $target_port, $attack_scale, $note, $priority, $timeout); @event = ($id, $hostname, $service, $detected, $type, $source_type, $source, $target_proto, $target_port, $attack_scale, $note, $priority, $timeout);
......
...@@ -13,7 +13,7 @@ use SOAP::Lite; ...@@ -13,7 +13,7 @@ use SOAP::Lite;
use IO::Socket::SSL qw(debug1); use IO::Socket::SSL qw(debug1);
use SOAP::Transport::HTTP; use SOAP::Transport::HTTP;
our $VERSION = "2.0"; #first iteration after 'port to Apache' our $VERSION = "2.0";
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
...@@ -31,12 +31,12 @@ sub errMsg ...@@ -31,12 +31,12 @@ sub errMsg
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
sub c2s sub c2s
{ {
my $uri = shift; my $uri = shift;
my $ssl_key_file = shift; my $ssl_key_file = shift;
my $ssl_cert_file = shift; my $ssl_cert_file = shift;
my $ssl_ca_file = shift; my $ssl_ca_file = shift;
my $method = shift; my $method = shift;
my $data = shift; my $data = shift;
my ($server, $port, $service) = $uri =~ /https:\/\/(.+)\:(\d+)\/(.+)/; my ($server, $port, $service) = $uri =~ /https:\/\/(.+)\:(\d+)\/(.+)/;
...@@ -109,17 +109,17 @@ sub saveNewEvent ...@@ -109,17 +109,17 @@ sub saveNewEvent
# create SOAP data object # create SOAP data object
my $event = SOAP::Data->name( my $event = SOAP::Data->name(
event => \SOAP::Data->value( event => \SOAP::Data->value(
SOAP::Data->name(SERVICE => $service), SOAP::Data->name(SERVICE => $service),
SOAP::Data->name(DETECTED => $detected), SOAP::Data->name(DETECTED => $detected),
SOAP::Data->name(TYPE => $type), SOAP::Data->name(TYPE => $type),
SOAP::Data->name(SOURCE_TYPE => $source_type), SOAP::Data->name(SOURCE_TYPE => $source_type),
SOAP::Data->name(SOURCE => $source), SOAP::Data->name(SOURCE => $source),
SOAP::Data->name(TARGET_PROTO => $target_proto), SOAP::Data->name(TARGET_PROTO => $target_proto),
SOAP::Data->name(TARGET_PORT => $target_port), SOAP::Data->name(TARGET_PORT => $target_port),
SOAP::Data->name(ATTACK_SCALE => $attack_scale), SOAP::Data->name(ATTACK_SCALE => $attack_scale),
SOAP::Data->name(NOTE => $note), SOAP::Data->name(NOTE => $note),
SOAP::Data->name(PRIORITY => $priority), SOAP::Data->name(PRIORITY => $priority),
SOAP::Data->name(TIMEOUT => $timeout) SOAP::Data->name(TIMEOUT => $timeout)
) )
); );
......
...@@ -233,7 +233,7 @@ change_permissions() ...@@ -233,7 +233,7 @@ change_permissions()
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# list of used Perl modules # list of used Perl modules
modules=(SOAP::Lite IO::Socket::SSL SOAP::Transport::TCP FindBin DateTime) modules=(SOAP::Lite IO::Socket::SSL SOAP::Transport::HTTP FindBin DateTime)
# read input # read input
while getopts "d:u:k:c:a:Vh" options; do while getopts "d:u:k:c:a:Vh" options; do
......
...@@ -239,7 +239,7 @@ change_permissions() ...@@ -239,7 +239,7 @@ change_permissions()
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# list of used Perl modules # list of used Perl modules
modules=(SOAP::Lite IO::Socket::SSL SOAP::Transport::TCP FindBin DateTime) modules=(SOAP::Lite IO::Socket::SSL SOAP::Transport::HTTP FindBin DateTime)
# read input # read input
while getopts "d:Vh" options; do while getopts "d:Vh" options; do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment