def revlookup(name):
 if (Base.defaults['server'] == []):
  Base.DiscoverNameServers()
 a = string.split(name, '.')
 a.reverse()
 b = (string.join(a, '.') + '.in-addr.arpa')
 return Base.DnsRequest(b, qtype='ptr').req().answers[0]['data']

def revlookup ( name ) : if ( Base . defaults [ 'server' ] == [ ] ) : Base . DiscoverNameServers ( ) a = string . split ( name , '.' ) a . reverse ( ) b = ( string . join ( a , '.' ) + '.in-addr.arpa' ) return Base . DnsRequest ( b , qtype = 'ptr' ) . req ( ) . answers [ 0 ] [ 'data' ]
convenience routine for doing a reverse lookup of an address .