Example #1
0
    def __init__(self, config):
        """
        Inits the object by registering the configuration object
        """
        self.config = config
        self.parser = Parser(self.config)
        self.geoloc = Geoloc(self.config)

        self.data = self.parser.getData()
Example #2
0
    # Basic configuration about the application
    debug = True

    # Authentication configuration
    auth_mail = "root@localhost"
    auth_password = "******"
    secret = "8897879668D998AD5E9C4200E90E6056BBEB2FA38745ECA4D6710BC535ACDA02"

    # Fail2Ban parsing configuration
    log_file = "/home/nocternology/Work/fail2dash/sample.log"
    parse_default = "all"

    # Geolocalisation API setup
    api_endpoint = "https://www.telize.com/geoip/%s"
    api_parser = "json"

config = Config()

# Parser module testing
parser = Parser(config)
data = parser.getData()
# print data
#
# # Host info testing
# print utils.gatherHostInfo()

# Geoloc module testing
geoloc = Geoloc(config)
for entry in data:
    print geoloc.get(entry["ip"])