Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluator #43

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Evaluator #43

wants to merge 6 commits into from

Conversation

suchaja7
Copy link

@suchaja7 suchaja7 commented Jun 4, 2019

No description provided.

from collections import defaultdict

#Enter an API key to obtain informations from nerd
NERD_API_KEY = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be loaded from configuration (see https://github.com/CESNET/Nemea-Detectors/tree/master/blacklistfilter/blacklist_downloader and @BLACKLISTFILTERDIR@ as an example) . It is not a best practice to modify installed scripts.

parser.add_option("-i", "--ifcspec", dest="ifcspec",
help="TRAP IFC specifier", metavar="IFCSPEC")
parser.add_option("-c", "--csv-path", dest="csv", help="Path to the csv files generated by Split Evidence")
parser.add_option("-e","--evidence-path", dest="evidence", help="Path to the folder for storing data of unreported detections")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the config file is passed using a new option, you need not to use configure to fill the correct path as it is in blacklist_downloader.

self.nerd_info = nerd_info

class MonitoredClient:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General comment: doc is missing... classes and methods should be documented.

self.statistics["packets_recv"] += int(flow["uint32 PACKETS"])
self.statistics["flows_recv"] += 1

#Determine other statistics
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does it mean Determine other statistics? Do you mean "compute statistics for ... client? + Doc should be written according to https://www.python.org/dev/peps/pep-0257/

continue
thresholds_reached = 0;
clients[key].process()
if (float(clients[key].statistics['bytes_per_pkt_sent']) > 187.1207):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These constants should be loaded from configuration file as well.

@@ -0,0 +1,131 @@
#include "FileHandler.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing licence and author.

@@ -0,0 +1,61 @@
#ifndef UNTITLED1_FILEHANDLER_H
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing licence and author

@@ -0,0 +1,12 @@
/************* THIS IS AUTOMATICALLY GENERATED FILE, DO NOT EDIT *************/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fields.c file should not be versioned in git repo, it should be generated automatically by Makefile

@@ -0,0 +1,13 @@
#ifndef _UR_FIELDS_H_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fields.h file should not be versioned in git repo, it should be generated automatically by Makefile

@@ -0,0 +1,316 @@
import csv
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing licence and author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants