fix farsight_passivedns - rdata 404 not found

pull/150/head
Christophe Vandeplas 2018-01-16 15:13:17 +01:00 committed by GitHub
parent 9734f59b02
commit 0be1886444
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -50,10 +50,10 @@ def lookup_name(client, name):
for i in item.get('rdata'): for i in item.get('rdata'):
# grab email field and replace first dot by @ to convert to an email address # grab email field and replace first dot by @ to convert to an email address
yield(i.split(' ')[1].rstrip('.').replace('.', '@', 1)) yield(i.split(' ')[1].rstrip('.').replace('.', '@', 1))
res = client.query_rdata_name(name) # RDATA = entries on the right-hand side of the domain name related labels # res = client.query_rdata_name(name) # RDATA = entries on the right-hand side of the domain name related labels
for item in res: # for item in res:
if item.get('rrtype') in ['A', 'AAAA', 'CNAME']: # if item.get('rrtype') in ['A', 'AAAA', 'CNAME']:
yield(item.get('rrname').rstrip('.')) # yield(item.get('rrname').rstrip('.'))
def lookup_ip(client, ip): def lookup_ip(client, ip):