Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DNSDB API parameters #319

Merged
merged 3 commits into from
Dec 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions analyzers/DNSDB/dnsdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@ def __init__(self):

def execute_dnsdb_service(self, client):
data = self.get_data()
rrtype = self.getParam('parameters.rrtype', None, None)
bailiwick = self.getParam('parameters.bailiwick', None, None)
before = self.getParam('parameters.before', None, None)
after = self.getParam('parameters.after', None, None)

if self.service == 'domain_name' and self.data_type in ['domain', 'fqdn']:
return client.query_rrset(data)
return client.query_rrset(data, rrtype=rrtype, bailiwick=bailiwick, before=before, after=after)
elif self.service == 'ip_history' and self.data_type == 'ip':
return client.query_rdata_ip(data)
return client.query_rdata_ip(data, before=before, after=after)
elif self.service == 'name_history' and self.data_type in ['domain', 'fqdn']:
return client.query_rdata_name(data)
return client.query_rdata_name(data, rrtype=rrtype, before=before, after=after)
else:
self.error('Unknown DNSDB service or invalid data type')

Expand Down