Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • Pavel.Valach/warden
1 result
Show changes
Showing
with 0 additions and 2352 deletions
warden-client-2.0
#
# warden-client.conf - configuration file for the warden sender/receiver client
#
#-------------------------------------------------------------------------------
# URI - URI address of Warden server
#-------------------------------------------------------------------------------
$URI = "https://warden-dev.cesnet.cz:443/Warden";
#-------------------------------------------------------------------------------
# SSL_KEY_FILE - path to client SSL certificate key file
#-------------------------------------------------------------------------------
$SSL_KEY_FILE = "/opt/warden-client/etc/warden-dev.cesnet.cz.key";
#-------------------------------------------------------------------------------
# SSL_CERT_FILE - path to client SSL certificate file
#-------------------------------------------------------------------------------
$SSL_CERT_FILE = "/opt/warden-client/etc/warden-dev.cesnet.cz.pem";
#-------------------------------------------------------------------------------
# SSL_CA_FILE - path to CA certificate file
#-------------------------------------------------------------------------------
$SSL_CA_FILE = "/etc/ssl/certs/tcs-ca-bundle.pem";
#-------------------------------------------------------------------------------
# MAX_RCV_EVENTS_LIMIT - maximum number of events the client is allowd to get
# from the Warden server in one batch
#-------------------------------------------------------------------------------
$MAX_RCV_EVENTS_LIMIT = 6000; #consumes app. 250 MB of memory
#-------------------------------------------------------------------------------
# Log options
#
# LOG_STDERR, LOG_SYSLOG - hide (0) or allow (1) error reporting on STDERR
# and/or to Syslog
# LOG_STDERR_VERBOSE, LOG_SYSLOG_VERBOSE - print only error message without
# a stack (0) or print debug info
# including err. message and stack (1)
#-------------------------------------------------------------------------------
$LOG_STDERR = 1;
$LOG_SYSLOG = 1;
$LOG_SYSLOG_FACILITY = "local7";
$LOG_VERBOSE = 0;
1;
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/usr/bin/perl
use strict;
use warnings;
use Test::More tests => 2;
use lib '..';
use WardenClientSend;
my $uri_ok = 'https://warden-dev.cesnet.cz:443/Warden';
my $ssl_key_file_ok = '/opt/warden-client/etc/warden-dev.cesnet.cz.key';
my $ssl_cert_file_ok = '/opt/warden-client/etc/warden-dev.cesnet.cz.pem';
my $ssl_ca_file_ok = '/opt/warden-client/etc/tcs-ca-meta-bundle.pem';
my $method_ok = 'saveNewEvent';
my $data_ok = '';
my $warden_path_ok = '/opt/warden-client';
my $warden_path_fail = '/path/to/fail';
my @event_ok = ("honeyscan", "1234567890", "portscan","IP", "123.123.123.123", "TCP", "22", "1234567890", "important note or comment", "null", "20");
my @vent_ok = ('HoneyScan', '2012-09-01T23:02:48', 'webattackReply-To:', '170.96.48.164', 'UDP', '44392354', 'tohle je takova normalni jednoducha poznamka', '180187');
my $ret;
#my ($ret) = WardenClientSend::c2s($uri_ok, $ssl_key_file_ok, $ssl_cert_file_ok, $ssl_ca_file_ok, $method_ok, $data_ok);
#ok ($ret == 1, 'Everything is fine!');
$ret = WardenClientSend::saveNewEvent($warden_path_fail,\@event_ok);
ok ($ret == 0, 'Bad Warden path!');
$ret = WardenClientSend::saveNewEvent($warden_path_ok,\@event_ok);
ok ($ret == 1, 'Everything is fine.');
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/bin/bash
#
# getStatus.pl
#
# Copyright (C) 2011-2012 Cesnet z.s.p.o
#
# Use of this source is governed by a BSD-style license, see LICENSE file.
VERSION='2.0'
if [ $UID -ne 0 ]; then
echo "You must be root for running this script!"
exit 1
fi
DB_NAME=`cat /opt/warden-server/etc/warden-server.conf | grep '$DB_NAME' | sed 's/[";]//g' |awk '{print $3}'`
DB_USER=`cat /opt/warden-server/etc/warden-server.conf | grep '$DB_USER' | sed 's/[";]//g' |awk '{print $3}'`
DB_HOST=`cat /opt/warden-server/etc/warden-server.conf | grep '$DB_HOST' | sed 's/[";]//g' |awk '{print $3}'`
echo "DB_NAME: $DB_NAME"
echo "DB_USER: $DB_USER"
echo "DB_HOST: $DB_HOST"
echo
echo "DB status:"
echo "----------"
echo "SELECT FROM_UNIXTIME( UNIX_TIMESTAMP( received ) - ( UNIX_TIMESTAMP( received ) % ( 60 ) ) ) AS t, COUNT( id ) FROM events GROUP BY t" | mysql -h $DB_HOST --user=$DB_USER $DB_NAME --password=$DB_PASS
echo
echo "apache2ctl status:"
echo "------------------"
apache2ctl status
echo
echo "uptime:"
echo "-------"
uptime
echo
echo -n klientu: ; netstat -nlpa | grep :443 | grep ESTA | wc -l;
echo -n FIN:; netstat | grep WAIT2 | wc -l
exit 0
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
AUTHORS AND MAINTAINERS :
MAIN DEVELOPERS:
Tomas Plesnik <plesnik@ics.muni.cz>
Jan Soukal <soukal@ics.muni.cz>
Michal Kostenec <kostenec@civ.zcu.cz>
CONTRIBUTORS:
Vit Slama <slama@cis.vutbr.cz>
Martin Drasar <drasar@ics.muni.cz>
TESTING:
Jakub Cegan <cegan@ics.muni.cz>
DEVELOPMENT MANAGER:
Jan Vykopal <vykopal@ics.muni.cz>
PROJECT MANAGERS:
Pavel Kacha <ph@cesnet.cz>
Andrea Kropacova <andrea@cesnet.cz>
COMMUNITY:
Radomir Orkac <orkac@cesnet.cz>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.