mirror of
https://github.com/adulau/passive-dns-atlas.git
synced 2025-01-04 23:13:17 +00:00
Additional and optional fields added
This commit is contained in:
parent
04497ab6b3
commit
5513d6290b
2 changed files with 4 additions and 2 deletions
|
@ -10,7 +10,7 @@
|
|||
import redis
|
||||
from prettytable import PrettyTable
|
||||
|
||||
fieldsSagan = ['Type', 'Name', 'TTL', 'Class']
|
||||
fieldsSagan = ['Type', 'Name', 'TTL', 'Class', 'Serial', 'Rname', 'MasterServerName', 'MaintainerName', 'Data']
|
||||
limit = 100
|
||||
|
||||
r = redis.StrictRedis(host='localhost', port=6379)
|
||||
|
|
|
@ -19,7 +19,7 @@ import base64
|
|||
|
||||
# Fields name are different in sagan and cousteau for parsed DNS
|
||||
fields = ['TYPE', 'NAME']
|
||||
fieldsSagan = ['Type', 'Name', 'TTL', 'Class']
|
||||
fieldsSagan = ['Type', 'Name', 'TTL', 'Class', 'Serial', 'Rname', 'MasterServerName', 'MaintainerName', 'Data']
|
||||
|
||||
def process_answers(data=None, sagan=False):
|
||||
if data is None:
|
||||
|
@ -31,6 +31,8 @@ def process_answers(data=None, sagan=False):
|
|||
#r.zincrby('mname', answer['MNAME'], 1)
|
||||
else:
|
||||
for field in fieldsSagan:
|
||||
if field not in data:
|
||||
continue
|
||||
r.zincrby(field.upper(), data[field], 1)
|
||||
|
||||
def truncating(default=50):
|
||||
|
|
Loading…
Reference in a new issue