(self, obj)
Perform a WHOIS lookup on the query value.
Perform a WHOIS lookup on the query value.
Perform a WHOIS lookup on the query value .
def do_whois_query(self, obj):
        """Perform a WHOIS lookup on the query value."""
        client = self._generate_request_instance('whois')
        query = self._get_query_type(obj)
        results = client.get_whois_details(query=query)
        self._check_response(results)
        top_level = ['registered', 'registryUpdatedAt', 'expiresAt',
                     'whoisServer', 'registrar', 'contactEmail']
        for field in top_level:
            self._add_result('WHOIS', results.get(field),
                             {'Key': self._gen_label(field)})
        for ns in results.get('nameServers', []):
            self._add_result('WHOIS', ns, {'Key': 'Nameserver'})
        for section in ['admin', 'tech', 'registrant']:
            for key, value in iteritems(results.get(section, {})):
                self._add_result('WHOIS Section %s' % section, value,
                                 {'Key': self._gen_label(key)})
def do_whois_query ( self , obj ) : client = self . _generate_request_instance ( 'whois' ) query = self . _get_query_type ( obj ) results = client . get_whois_details ( query = query ) self . _check_response ( results ) top_level = [ 'registered' , 'registryUpdatedAt' , 'expiresAt' , 'whoisServer' , 'registrar' , 'contactEmail' ] for field in top_level : self . _add_result ( 'WHOIS' , results . get ( field ) , { 'Key' : self . _gen_label ( field ) } ) for ns in results . get ( 'nameServers' , [ ] ) : self . _add_result ( 'WHOIS' , ns , { 'Key' : 'Nameserver' } ) for section in [ 'admin' , 'tech' , 'registrant' ] : for key , value in iteritems ( results . get ( section , { } ) ) : self . _add_result ( 'WHOIS Section %s' % section , value , { 'Key' : self . _gen_label ( key ) } )