fix bug in censysearch.py

This commit is contained in:
L1ghtn1ng 2022-11-24 16:43:15 +00:00
parent c421108c3d
commit 43ed255584

View file

@ -1,6 +1,7 @@
from typing import Set
from theHarvester.discovery.constants import MissingKey
from theHarvester.lib.core import Core
from theHarvester.lib.version import version as thehavester_version
from censys.search import CensysCertificates
from censys.common import __version__
from censys.common.exceptions import (
@ -25,7 +26,7 @@ async def do_search(self) -> None:
cert_search = CensysCertificates(
api_id=self.key[0],
api_secret=self.key[1],
user_agent=f"censys/{__version__} (theHarvester/{Core.version()}; +https://github.com/laramies/theHarvester)",
user_agent=f"censys/{__version__} (theHarvester/{thehavester_version}); +https://github.com/laramies/theHarvester)",
)
except CensysUnauthorizedException:
raise MissingKey('Censys ID and/or Secret')