File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -222,9 +222,11 @@ def whois(self, query: str) -> str:
222
222
zone = 'ipv6'
223
223
elif query .lower ().startswith ('as' ) and query .lower ()[2 :].isdigit ():
224
224
zone = 'asn'
225
- # if query is no ip, asn or fqdn
226
225
elif not utils .is_well_formed_fqdn (query ):
227
- zone = 'abuse-c' # what would be the correct zone for an abuse-c object
226
+ # if query is no ip, asn or fqdn
227
+ # it's probably a NIC handle (Network Information Centre handle)
228
+ # probably an abuse-c object
229
+ zone = 'NIC-handle'
228
230
else :
229
231
# Domain, strip hostname part if needed
230
232
query , zone = self ._strip_hostname (query )
Original file line number Diff line number Diff line change @@ -127,10 +127,6 @@ def on_connect(self):
127
127
if self ._timed_out :
128
128
return
129
129
whois_query = self .data .decode ().strip ().lower ()
130
- #should all the chekcing be removed?
131
- #if not utils.is_well_formed_fqdn(whois_query) and ':' not in whois_query and not whois_query.lower().startswith('as'):
132
- # whois_entry = "; Bad request: '{0}'\r\n".format(whois_query)
133
- #else:
134
130
whois_entry = self .query_fct (whois_query )
135
131
yield self .stream .write (whois_entry .encode ())
136
132
except tornado .iostream .StreamClosedError :
You can’t perform that action at this time.
0 commit comments