Updated now based on timestamp
Did I forget to add feed_asn.py a few commits ago? Oh well...
This commit is contained in:
parent
8d94b80fd0
commit
f3eedcba22
4 changed files with 69 additions and 27 deletions
|
@ -28,6 +28,7 @@ if __name__ == '__main__':
|
|||
# split = line.split(b'"')
|
||||
split = line.split('"')
|
||||
try:
|
||||
updated = int(split[3])
|
||||
name = split[7]
|
||||
dtype = split[11]
|
||||
value = split[15]
|
||||
|
@ -43,13 +44,13 @@ if __name__ == '__main__':
|
|||
DB.enter_step('feed_switch')
|
||||
if dtype == 'a':
|
||||
for rule in DB.get_ip4(value):
|
||||
DB.set_hostname(name, source=rule)
|
||||
DB.set_hostname(name, source=rule, updated=updated)
|
||||
elif dtype == 'cname':
|
||||
for rule in DB.get_domain(value):
|
||||
DB.set_hostname(name, source=rule)
|
||||
DB.set_hostname(name, source=rule, updated=updated)
|
||||
elif dtype == 'ptr':
|
||||
for rule in DB.get_domain(value):
|
||||
DB.set_ip4address(name, source=rule)
|
||||
DB.set_ip4address(name, source=rule, updated=updated)
|
||||
DB.enter_step('iowait')
|
||||
except KeyboardInterrupt:
|
||||
log.warning("Interupted.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue