From 8fc6b9c45eb961cc40e390f7f6d9acdf50e1149f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Copin?= Date: Tue, 11 Jul 2023 09:09:16 +0200 Subject: [PATCH] Add missing configuration in lib cpeguesser.py --- lib/cpeguesser.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/cpeguesser.py b/lib/cpeguesser.py index 45d20e2..cbc9789 100644 --- a/lib/cpeguesser.py +++ b/lib/cpeguesser.py @@ -2,11 +2,16 @@ # -*- coding: utf-8 -*- import redis +from dynaconf import Dynaconf +# Configuration +settings = Dynaconf( + settings_files=['../config/settings.yaml'] +) class CPEGuesser: def __init__(self): - self.rdb = redis.Redis(host='127.0.0.1', port=6379, db=8, decode_responses=True) + self.rdb = redis.Redis(host=settings.redis.host, port=settings.redis.port, db=8, decode_responses=True) def guessCpe(self, words): k = []