mirror of
https://github.com/C24Be/AS_Network_List.git
synced 2026-01-24 23:26:38 +03:00
whois
This commit is contained in:
@@ -22,7 +22,7 @@ def resolve(filename):
|
||||
else:
|
||||
response = whois_query(line[0], "netname", True)
|
||||
if response is None:
|
||||
name = "-not-found-"
|
||||
name = "-no-description-"
|
||||
else:
|
||||
name = response.strip()
|
||||
print(line[0] + " " + name)
|
||||
|
||||
@@ -29,6 +29,9 @@ def whois_query(query, get_field="netname", get_org=False):
|
||||
if line.startswith(get_field + ':'):
|
||||
basic_name = line.split(':')[1].strip()
|
||||
|
||||
if basic_name is None:
|
||||
basic_name = '-no-description-'
|
||||
|
||||
if org_name is None:
|
||||
org_name = 'No org name found'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user