Commit 04640c07 authored by Romain Courteaud's avatar Romain Courteaud

Provide hostname and resolver info

parent 01ff7ab4
......@@ -13,6 +13,7 @@ setup(
"forcediphttpsadapter",
"peewee>2.10.1",
"click>=7.0",
"dnspython",
],
entry_points={
"console_scripts": ["urlchecker=urlchecker_cli:runUrlChecker "]
......
......@@ -5,9 +5,10 @@ import sys
import traceback
import time
from forcediphttpsadapter.adapters import ForcedIPHTTPSAdapter
import dns.resolver
__version__ = "0.0.2"
__version__ = "0.0.3"
PREFERRED_TYPE = "text/html"
TIMEOUT = 2
......@@ -104,6 +105,10 @@ class WebBot:
def run(self, url):
print(time.strftime("%Y-%m-%d %H:%M:%S"))
print("Hostname", socket.gethostname())
myresolver = dns.resolver.Resolver()
print("Resolvers", myresolver.nameservers)
try:
self.check(url)
except KeyboardInterrupt:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment