commit
b5b7050232
File diff suppressed because one or more lines are too long
|
@ -20,6 +20,7 @@ import time
|
|||
import logging
|
||||
import sys
|
||||
import argparse
|
||||
import os
|
||||
|
||||
parser = argparse.ArgumentParser(description='Import array of standard Passive DNS cof format into your Passive DNS server')
|
||||
parser.add_argument('--file', dest='filetoimport', help='JSON file to import')
|
||||
|
@ -47,10 +48,15 @@ logger.addHandler(ch)
|
|||
|
||||
logger.info("Starting and using FIFO {} from D4 server".format(myqueue))
|
||||
|
||||
d4_server = config.get('global', 'd4-server')
|
||||
r = redis.Redis(host="127.0.0.1",port=6400)
|
||||
r_d4 = redis.Redis(host=d4_server.split(':')[0], port=d4_server.split(':')[1], db=2)
|
||||
analyzer_redis_host = os.getenv('D4_ANALYZER_REDIS_HOST', '127.0.0.1')
|
||||
analyzer_redis_port = int(os.getenv('D4_ANALYZER_REDIS_PORT', 6400))
|
||||
|
||||
d4_server, d4_port = config.get('global', 'd4-server').split(':')
|
||||
host_redis_metadata = os.getenv('D4_REDIS_METADATA_HOST', d4_server)
|
||||
port_redis_metadata = int(os.getenv('D4_REDIS_METADATA_PORT', d4_port))
|
||||
|
||||
r = redis.Redis(host=analyzer_redis_host, port=analyzer_redis_port)
|
||||
r_d4 = redis.Redis(host=host_redis_metadata, port=port_redis_metadata, db=2)
|
||||
|
||||
with open('../etc/records-type.json') as rtypefile:
|
||||
rtype = json.load(rtypefile)
|
||||
|
|
|
@ -22,6 +22,7 @@ import configparser
|
|||
import time
|
||||
import logging
|
||||
import sys
|
||||
import os
|
||||
|
||||
config = configparser.RawConfigParser()
|
||||
config.read('../etc/analyzer.conf')
|
||||
|
@ -45,9 +46,15 @@ logger.addHandler(ch)
|
|||
|
||||
logger.info("Starting and using FIFO {} from D4 server".format(myqueue))
|
||||
|
||||
d4_server = config.get('global', 'd4-server')
|
||||
r = redis.Redis(host="127.0.0.1",port=6400)
|
||||
r_d4 = redis.Redis(host=d4_server.split(':')[0], port=d4_server.split(':')[1], db=2)
|
||||
analyzer_redis_host = os.getenv('D4_ANALYZER_REDIS_HOST', '127.0.0.1')
|
||||
analyzer_redis_port = int(os.getenv('D4_ANALYZER_REDIS_PORT', 6400))
|
||||
|
||||
d4_server, d4_port = config.get('global', 'd4-server').split(':')
|
||||
host_redis_metadata = os.getenv('D4_REDIS_METADATA_HOST', d4_server)
|
||||
port_redis_metadata = int(os.getenv('D4_REDIS_METADATA_PORT', d4_port))
|
||||
|
||||
r = redis.Redis(host=analyzer_redis_host, port=analyzer_redis_port)
|
||||
r_d4 = redis.Redis(host=host_redis_metadata, port=port_redis_metadata, db=2)
|
||||
|
||||
|
||||
with open('../etc/records-type.json') as rtypefile:
|
||||
|
|
Loading…
Reference in New Issue