-
Notifications
You must be signed in to change notification settings - Fork 385
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
dacdbec
commit 071bb5a
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env python3 | ||
from cortexutils.analyzer import Analyzer | ||
from whois_wrapper import query | ||
|
||
|
||
class CERTatPassiveDNSAnalyzer(Analyzer): | ||
"""Very simple passive dns wrapper for pdns.cert.at. Needs no credentials because access is controlled through | ||
firewall rules. If you want to get access, you have to contact CERT.AT, but: | ||
CERT.AT pDNS is not a public service. It is only available for national / governmental CERTs in good standing with | ||
CERT.AT. For access, you have to get in contact with CERT.AT. | ||
""" | ||
def __init__(self): | ||
Analyzer.__init__(self) | ||
self.limit = self.get_param('config.limit', '100') | ||
|
||
def run(self): | ||
self.report({'results': query(self.getData(), int(self.limit))}) | ||
|
||
def summary(self, raw): | ||
results = raw.get('results') | ||
return {'hits': len(results)} | ||
|
||
if __name__ == '__main__': | ||
CERTatPassiveDNSAnalyzer().run() |