IsInternalDomainName
This script accepts multiple values for both arguments and will iterate through each of the domains to check if the specified subdomains are located in at least one of the specified main domains. If the tested subdomain is in one of the main domains, the result will be true. For example, if the domain_to_check values are apps.paloaltonetworks.com and apps.paloaltonetworks.bla and the domains_to_compare values are paloaltonetworks.com and demisto.com, the result for apps.paloaltonetworks.com will be true since it is a part of the paloaltonetworks.com domain. The result for apps.paloaltonetworks.bla will be false since it is not a part of the paloaltonetworks.com or demisto.com domain.
python · Common Scripts
Details
| ID | IsInternalDomainName |
|---|---|
| Language | python |
| From Version | 5.0.0 |
| Docker Image | demisto/python3:3.12.13.10404775 |
| Tags | Utility |
README
This script accepts multiple values for both arguments and will iterate through each of the domains to check if the specified subdomains are located in at least one of the specified main domains.
If the tested subdomain is in one of the main domains, the result will be true.
For example, if the domain_to_check values are apps.paloaltonetworks.com and apps.paloaltonetworks.bla and the domains_to_compare values are paloaltonetworks.com and demisto.com, the result for apps.paloaltonetworks.com will be true since it is a part of the paloaltonetworks.com domain. The result for apps.paloaltonetworks.bla will be false since it is not a part of the paloaltonetworks.com or demisto.com domain.
Script Data
| Name | Description |
|---|---|
| Script Type | python3 |
| Tags | Utility |
| Cortex XSOAR Version | 5.0.0 |
Inputs
| Argument Name | Description |
|---|---|
| main_domains | A comma-separated list of main domains. The subdomains will be compared to this list of main domains. For example, google.com. |
| possible_sub_domains_to_test | A comma-separated list of subdomains. These subdomains will be compared to the list of main domains. |
Outputs
| Path | Description | Type |
|---|---|---|
| IsInternalDomain.DomainToTest | The subdomain that was checked to see if it is part of the specified domains. | String |
| IsInternalDomain.IsInternal | True, if the subdomain is part of one of the specified domains. Otherwise, false. | Boolean |
| IsInternalDomain.DomainToCompare | The names of the main domains that were used to compare the subdomains to. | String |
args: - auto: PREDEFINED default: true description: A comma-separated list of main domains. The subdomains will be compared to this list of main domains. For example, google.com. isArray: true name: main_domains required: true - auto: PREDEFINED default: true description: A comma-separated list of subdomains. These subdomains will be compared to the list of main domains. isArray: true name: possible_sub_domains_to_test required: true comment: This script accepts multiple values for both arguments and will iterate through each of the domains to check if the specified subdomains are located in at least one of the specified main domains. If the tested subdomain is in one of the main domains, the result will be true. For example, if the domain_to_check values are apps.paloaltonetworks.com and apps.paloaltonetworks.bla and the domains_to_compare values are paloaltonetworks.com and demisto.com, the result for apps.paloaltonetworks.com will be true since it is a part of the paloaltonetworks.com domain. The result for apps.paloaltonetworks.bla will be false since it is not a part of the paloaltonetworks.com or demisto.com domain. commonfields: id: IsInternalDomainName version: -1 name: IsInternalDomainName outputs: - contextPath: IsInternalDomain.DomainToTest description: The subdomain that was checked to see if it is part of the specified domains. type: String - contextPath: IsInternalDomain.IsInternal description: True, if the subdomain is part of one of the specified domains. Otherwise, false. type: Boolean - contextPath: IsInternalDomain.DomainToCompare description: The names of the main domains that were used to compare the subdomains to. type: String script: '-' subtype: python3 tags: - Utility timeout: '0' type: python dockerimage: demisto/python3:3.12.13.10404775 fromversion: 5.0.0 tests: - No tests (auto formatted)