import argparse
import asyncio
+import configparser
import datetime
import email.message
import email.utils
"""
This is the main class that handles all the things...
"""
- def __init__(self):
+ def __init__(self, config):
+ # Parse the configuration file
+ self.config = configparser.ConfigParser()
+ self.config.read(config)
+
# Fetch CPU count
cpu_count = multiprocessing.cpu_count()
# Command Line Arguments
parser.add_argument("--verbose", "-v", action="count", help="Be more verbose")
+ parser.add_argument("--config", "-c",
+ help="Configuration File", default="/etc/suricata/reporter.conf")
# Parse command line arguments
args = parser.parse_args()
setup_logging(loglevel=loglevel)
# Create the repoert
- reporter = Reporter()
+ reporter = Reporter(args.config)
# Run!
await reporter.run()