Skip to main content

ResolveShortenedURL

This Script is part of the Common Scripts Pack.#

Supported versions

Supported Cortex XSOAR versions: 6.5.0 and later.

This script resolves the original URL from a given shortened URL and places the resolved URL in the playbook context and output.

Disclaimer:

  • Using online services for resolving URLs exposes the server IP address to these services.
  • The Built-In service visits the URL and follows redirects on the server, which exposes the server IP address to the redirect URLs.

Script Data#


NameDescription
Script Typepython3
TagsUtility
Cortex XSOAR Version6.5.0

Inputs#


Argument NameDescription
serviceThe service to use for resolving the URL. If not set, a default service is used.
urlThe URL to resolve.
redirect_limitA maximum number of recursions to run in case of nested shortened-URLs. Use 0 for unlimited (not recommended).
insecureTrust any certificate (not secure).

Outputs#


PathDescriptionType
URL.DataThe resolved URL data.string
ResolveShortenedURL.OriginalURLThe original shortened URL.string
ResolveShortenedURL.ResolvedURLThe resolved URL.string
ResolveShortenedURL.ServiceNameThe name of the service used to resolve the URL.string
ResolveShortenedURL.UsageCountThe usage count for the current IP. If the count exceeds 10 in an hour, an error is returned. Relevant only if the unshorten.me service is used.int
ResolveShortenedURL.RedirectCountThe number of redirects followed to resolve the URL.int
ResolveShortenedURL.RedirectHistoryThe history of redirects followed to resolve the URL.list