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