Commit 5e3ffef6 authored by Tomas Hlavacek's avatar Tomas Hlavacek

Fix whois queries for subnets to ARIN whois.

ARIN whois server does not allow queries for 1.2.0.0/20 but we can query
any IP address in that block.
Remove the /<netmask> part and it works.
parent 4a6c29e8
......@@ -640,22 +640,20 @@ class ULGCgi:
url=None
urlc=None
if(objtype == 'IP'):
ot='inetnum,inet6num'
url=defaults.getIPPrefixURL(key)
urlc=defaults.STRING_DETAILS+' '+str(key)
elif(objtype == 'AS'):
ot='aut-num'
url=defaults.getASNURL(key)
urlc=defaults.STRING_DETAILS+' '+key
else:
ot='aut-num,inetnum,inet6num'
m = re.match('^\s*([^/]+)/[0-9]+\s*$',key)
if(m):
key = m.group(1)
template = self.loader.load(defaults.whois_template_file)
s = subprocess.Popen([defaults.bin_whois,
'-r',
'-H',
'-T '+ot,
key], stdout=subprocess.PIPE)
res=''
begin = False
......
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