From 2a6d0a8e9c26498210d5cc33c354765d7a14688d Mon Sep 17 00:00:00 2001 From: lza_menace Date: Thu, 8 Jun 2023 22:53:25 -0700 Subject: [PATCH] setting up whois info --- requirements.txt | 1 + xmrnodes/helpers.py | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index d171fe3..42a44b8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -30,3 +30,4 @@ Werkzeug==2.2.3 WTForms==3.0.1 yarl==1.8.2 zipp==3.15.0 +dnspython==1.15.0 diff --git a/xmrnodes/helpers.py b/xmrnodes/helpers.py index d14487e..ec3f214 100644 --- a/xmrnodes/helpers.py +++ b/xmrnodes/helpers.py @@ -6,7 +6,6 @@ from os import path import geoip2.database from requests import get as r_get from urllib.parse import urlparse -from levin.section import Section from levin.bucket import Bucket from levin.ctypes import * from levin.constants import LEVIN_SIGNATURE @@ -166,4 +165,12 @@ def get_geoip(ip_or_dns): resolved = socket.gethostbyname(host) host = host if resolved == host else resolved with geoip2.database.Reader("./data/GeoLite2-City.mmdb") as reader: - return reader.city(host) \ No newline at end of file + return reader.city(host) + +def get_whois(ip_or_dns): + pass + +# asn +# asn_cidr +# asn_country_code +# asn_description