Add missing configuration in lib cpeguesser.py

This commit is contained in:
Sébastien Copin 2023-07-11 09:09:16 +02:00
parent 6be6f0210a
commit 8fc6b9c45e

View file

@ -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 = []