diff --git a/analyzers/Hunterio/hunterio_analyzer.py b/analyzers/Hunterio/hunterio_analyzer.py index 4752e95c9..b687e15c2 100755 --- a/analyzers/Hunterio/hunterio_analyzer.py +++ b/analyzers/Hunterio/hunterio_analyzer.py @@ -32,8 +32,22 @@ def run(self): if self.service == 'domainsearch' and (self.data_type == 'domain' or self.data_type == 'fqdn'): try: - response = requests.get("{}domain-search?domain={}&api_key={}".format(self.URI, self.get_data(), self.key)) - self.report(response.json()) + offset = 0 + firstResponse = requests.get("{}domain-search?domain={}&api_key={}&limit=100&offset={}".format(self.URI, self.get_data(), self.key, offset)) + firstResponse = firstResponse.json() + + if firstResponse.get('meta'): + meta = firstResponse.get('meta') + + while meta.get('results') > offset: + offset = meta.get('limit') + meta.get('offset') + additionalResponse = requests.get("{}domain-search?domain={}&api_key={}&limit=100&offset={}".format( + self.URI, self.get_data(), self.key, offset)) + additionalResponse = additionalResponse.json() + meta = additionalResponse.get('meta') + firstResponse['data']['emails'] += additionalResponse['data']['emails'] + + self.report(firstResponse) except Exception as e: self.unexpectedError(e) else: diff --git a/thehive-templates/Hunterio_DomainSearch_1_0/long.html b/thehive-templates/Hunterio_DomainSearch_1_0/long.html new file mode 100644 index 000000000..3766ce905 --- /dev/null +++ b/thehive-templates/Hunterio_DomainSearch_1_0/long.html @@ -0,0 +1,66 @@ +
+
+ hunter.io domain search to find email addresses +
Report for + {{artifact.data}} +
+
+ +

{{content.meta.results}} addresses found.

+ + +
+ +
+ Pattern : {{content.data.pattern}} +
+ +
+ Organization: {{content.data.organization}} +
+ + + + + + + + + + + + + + + + + + + + + + + + +
EmailNamePositionTypeTwitterLinkedInPhoneConfidenceSources
{{email.value}}{{email.fisrtname}} {{email.lastname}}{{email.position}}{{email.type}}{{email.twitter}}{{email.linkedin}}{{email.phone_number}} + {{email.confidence}} + +
    +
  • {{src.domain}}
  • +
+
+
+ +
+ No results found +
+
+ +
+
+ {{(artifact.data || artifact.attachment.name) | fang}} +
+
+ {{content.errorMessage}} +
+
\ No newline at end of file diff --git a/thehive-templates/Hunterio_DomainSearch_1_0/short.html b/thehive-templates/Hunterio_DomainSearch_1_0/short.html new file mode 100644 index 000000000..57f9d29cf --- /dev/null +++ b/thehive-templates/Hunterio_DomainSearch_1_0/short.html @@ -0,0 +1,3 @@ + + {{t.namespace}}:{{t.predicate}}={{t.value}} +