Do reverse DNS on feeds parsers

This commit is contained in:
Gregory Soutade
2016-01-18 07:33:48 +01:00
parent 5c750e8b0c
commit 519033e474
4 changed files with 19 additions and 8 deletions

View File

@@ -64,9 +64,12 @@ class IWLAPostAnalysisReverseDNS(IPlugin):
return True
def hook(self):
hits = self.iwla.getValidVisitors()
hits = self.iwla.getCurrentVisists()
for (k, hit) in hits.items():
if hit.get('dns_analysed', False): continue
if not hit['feed_parser'] and\
not self.iwla.isValidVisitor(hit):
continue
try:
name, _, _ = socket.gethostbyaddr(k)
hit['remote_addr'] = name.lower()