Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DomainTools Iris Investigate: Code style update - Fix linting issues #25

Merged
merged 1 commit into from
Jul 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions domaintools_iris_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import codecs
import json
import re

# Imports local to this App
import sys
from datetime import datetime, timedelta
Expand All @@ -17,7 +16,6 @@
import phantom.app as phantom
import requests
import tldextract

from domaintools import API
from phantom.action_result import ActionResult
from phantom.base_connector import BaseConnector
Expand Down Expand Up @@ -459,12 +457,26 @@ def _reverse_lookup_domain(self, param):
for a in data[0]["mx"]:
if "ip" in a:
for b in a["ip"]:
ips.append({"ip": b["value"], "type": "MX IP", "count": b["count"], "count_string": self._convert_null_value_to_empty_string(b["count"])})
ips.append(
{
"ip": b["value"],
"type": "MX IP",
"count": b["count"],
"count_string": self._convert_null_value_to_empty_string(b["count"])
}
)

for a in data[0]["name_server"]:
if "ip" in a:
for b in a["ip"]:
ips.append({"ip": b["value"], "type": "NS IP", "count": b["count"], "count_string": self._convert_null_value_to_empty_string(b["count"])})
ips.append(
{
"ip": b["value"],
"type": "NS IP",
"count": b["count"],
"count_string": self._convert_null_value_to_empty_string(b["count"])
}
)

sorted_ips = sorted(
ips,
Expand Down