Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, verbose=True):
# Initialize logger
self.logger = Logger(os.path.dirname(os.path.abspath(__file__)) + '/logs/worker.log')
# Load configuration
self.config = yaml.load(open(os.path.dirname(os.path.abspath(__file__)) + '/config.yml'))
# Initialize OpenCTI client
self.opencti = OpenCTI(
self.config['opencti']['api_url'],
self.config['opencti']['api_key'],
os.path.dirname(os.path.abspath(__file__)) + '/logs/worker.log',
self.config['opencti']['verbose']
)
def __init__(self, verbose=True):
# Initialize connectors object
self.connectors = {}
# Initialize logger
self.logger = Logger(os.path.dirname(os.path.abspath(__file__)) + '/scheduler.log')
# Load configuration
self.config = yaml.load(open(os.path.dirname(os.path.abspath(__file__)) + '/config.yml'))
# Initialize OpenCTI client
self.opencti = OpenCTI(
self.config['opencti']['api_url'],
self.config['opencti']['api_key'],
os.path.dirname(os.path.abspath(__file__)) + '/scheduler.log',
self.config['opencti']['verbose']
)