Skip to main content

IsInternalDomainName

This Script is part of the Common Scripts Pack.#

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#


NameDescription
Script Typepython3
TagsUtility
Cortex XSOAR Version5.0.0

Inputs#


Argument NameDescription
main_domainsA 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_testA comma-separated list of subdomains. These subdomains will be compared to the list of main domains.

Outputs#


PathDescriptionType
IsInternalDomain.DomainToTestThe subdomain that was checked to see if it is part of the specified domains.String
IsInternalDomain.IsInternalTrue, if the subdomain is part of one of the specified domains. Otherwise, false.Boolean
IsInternalDomain.DomainToCompareThe names of the main domains that were used to compare the subdomains to.String