| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
The DoHClient module performs reverse DNS lookups for IPv4 addresses via DNS over HTTPS (DoH) using the Quad9 DoH endpoint. It includes caching and logging functionalities for efficiency and easier debugging.
Note: This module currently only supports IPv4 addresses.
Note: doh_cache and doh_logger are custom modules; ensure they are included in your project directory.
Here's a simple example of how to use the DoHClient module:
python from DoHClient import DoHClient
doh_client = DoHClient()
result = doh_client.reverse_lookup("8.8.8.8")
print(result)
Ensure the custom logging module, doh_logger, is set up before running the main module to capture all debug information.
The caching duration is set to 5 minutes by default and can be modified by adjusting the CACHE_DURATION static variable in the DoHClient class.
The DoHClient class is responsible for reverse DNS lookups for IPv4 addresses. It integrates a caching mechanism to reduce the number of network requests. For an in-depth understanding, refer to the code documentation.
The Cache class acts as an LRU (Least Recently Used) cache that retains DNS lookups for a specified timeframe. The cache has a size limit and autonomously evicts the oldest or stale entries based on size and duration.
The doh_logger module offers a configurable logging mechanism to monitor the application's behavior, track down errors, and comprehend its flow. Each log entry consists of a timestamp, logger's name, log level, and the message.
Pull requests are welcome. For significant modifications, please initiate an issue first to discuss the intended changes.
MIT License.
| Back | FazBrowse Home | New Git URL |