FormatURL

Strips, unquotes and unescapes URLs. If the URL is a Proofpoint or ATP URL, extracts its redirect URL. If more than one URL is passed to the formatter, the separator must be a pipe ("|").

python · Common Scripts

Details

IDFormatURL
Languagepython
From Version5.5.0
Docker Imagedemisto/python3:3.12.13.10404775
Tagsindicator-format

README

Strips, unquotes and unescapes URLs. If the URL is a Proofpoint or ATP URL, extracts its redirect URL.
If more than one URL is passed to the formatter, the separator must be a pipe (“|”).

Script Data


Name Description
Script Type python3
Tags indicator-format
Cortex XSOAR Version 5.5.0

Inputs


Argument Name Description  
input A pipe (“ ”) separated list of URL inputs.

Outputs


Path Description Type
URL URL formatted. String

Script Example

!FormatURL input=https://urldefense.proofpoint.com/v2/url?u=https-3A__example.com_something.html

Context Example

{
    "URL": [
        "https://example.com/something.html"
    ]
}

Human Readable Output

https://example.com/something.html

args:
- description: A pipe ("|") separated list of URL inputs.
  isArray: true
  name: input
  required: true
comment: "Strips, unquotes and unescapes URLs. If the URL is a Proofpoint or ATP URL, extracts its redirect URL. If more than one URL is passed to the formatter, the separator must be a pipe (\"|\")."
commonfields:
  id: FormatURL
  version: -1
name: FormatURL
outputs:
- contextPath: URL
  description: URL formatted.
  type: String
script: '-'
tags:
- indicator-format
timeout: '0'
type: python
subtype: python3
dockerimage: demisto/python3:3.12.13.10404775
fromversion: 5.5.0
tests:
- FormatURL-Test
- URL extraction test
- FormattingPerformance - Test