From c31c75ee77a069577a91e15b17c0565aea3586c0 Mon Sep 17 00:00:00 2001 From: JD Babac Date: Wed, 12 Jul 2023 01:36:08 +0800 Subject: [PATCH] Revert `domains` text change back to `domain`. --- domaintools_iris.json | 16 ++++++++-------- domaintools_iris_connector.py | 7 +++++-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/domaintools_iris.json b/domaintools_iris.json index 4daf161..ed9fe7b 100644 --- a/domaintools_iris.json +++ b/domaintools_iris.json @@ -111,7 +111,7 @@ "identifier": "domain_reputation", "read_only": true, "parameters": { - "domains": { + "domain": { "description": "Domain or comma-separated list of domains to query", "data_type": "string", "contains": [ @@ -132,7 +132,7 @@ }, "output": [ { - "data_path": "action_result.parameter.domains", + "data_path": "action_result.parameter.domain", "data_type": "string", "contains": [ "url", @@ -440,7 +440,7 @@ "identifier": "reverse_lookup_domain", "read_only": true, "parameters": { - "domains": { + "domain": { "description": "Domain or comma-separated list of domains to query", "data_type": "string", "contains": [ @@ -460,7 +460,7 @@ }, "output": [ { - "data_path": "action_result.parameter.domains", + "data_path": "action_result.parameter.domain", "data_type": "string", "contains": [ "url", @@ -991,7 +991,7 @@ "identifier": "domain_investigate", "read_only": true, "parameters": { - "domains": { + "domain": { "description": "Domain or comma-separated list of domains to query using the Iris Investigate API", "data_type": "string", "contains": [ @@ -1020,7 +1020,7 @@ ] }, { - "data_path": "action_result.parameter.domains", + "data_path": "action_result.parameter.domain", "data_type": "string", "contains": [ "url", @@ -1667,7 +1667,7 @@ "identifier": "domain_enrich", "read_only": true, "parameters": { - "domains": { + "domain": { "description": "Domain or comma-separated list of domains to query using the Iris Enrich API (if provisioned)", "data_type": "string", "contains": [ @@ -1696,7 +1696,7 @@ ] }, { - "data_path": "action_result.parameter.domains", + "data_path": "action_result.parameter.domain", "data_type": "string", "contains": [ "url", diff --git a/domaintools_iris_connector.py b/domaintools_iris_connector.py index 0af7e48..6bc9b25 100644 --- a/domaintools_iris_connector.py +++ b/domaintools_iris_connector.py @@ -315,8 +315,11 @@ def handle_action(self, param): self._proxy_url = self._get_proxy_url(config) # If there is a domains attribute, do tldextract - if param.get("domains"): - hostnames = param.get("domains").replace(" ", "").strip(",").split(",") + # Note: Parameter remained to be named `domain` to avoid + # modifying the Playbooks currently being used by customers + domains = param.get("domain") + if domains: + hostnames = domains.replace(" ", "").strip(",").split(",") self._domains = self._get_domains(hostnames) # If pivoting and the type is domain, set the query_vca if param.get("pivot_type") == "domain":