# Defang URL

## Description

This operation makes URLs safe to share by preventing accidental clicks or access. This is especially useful in cybersecurity contexts, where you might need to share potentially malicious URLs without making them active links.

***

## Data types

These are the input/output expected data types for this operation:

### Input data

![](https://965373739-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkxZeV4nlXcIAjMGZxzLI%2Fuploads%2FExtApHuiMxiHgaNWDLb2%2Fimage.png?alt=media\&token=5f4e1372-a2db-4d7e-b81b-976507cac896) - URLs you want to defang.

### Output data

![](https://965373739-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkxZeV4nlXcIAjMGZxzLI%2Fuploads%2FyeZGvHDhYqskHKW5bdnp%2Fimage.png?alt=media\&token=d72665aa-3d46-4572-a463-a62344ee7f88) - Defanged URLs.

***

## Parameters

These are the parameters you need to configure to use this operation (mandatory parameters are marked with a <mark style="color:red;">**\***</mark>):

<details>

<summary>Escape Dots<mark style="color:red;"><strong>*</strong></mark></summary>

Set this parameter to **true** if you want to replace `.` in the domain with `[.]`. This breaks the URL’s domain and subdomain structure, making the URL inactive. For example, `example.com` becomes `example[.]com`.

</details>

<details>

<summary>Escape HTTP<mark style="color:red;"><strong>*</strong></mark></summary>

Set this parameter to **true** if you want to modify `http` or `https` to `hxxp` or `hxxps`, respectively. This makes the protocol itself inactive, adding an extra layer of safety.

</details>

<details>

<summary>Escape ://<mark style="color:red;"><strong>*</strong></mark></summary>

Set this parameter to **true** if you want to replace the `://` separator with `[://]`, making it clear where the protocol ends while breaking its functionality.

</details>

<details>

<summary>Process Type<mark style="color:red;"><strong>*</strong></mark></summary>

Choose one of the following options:

* **Valid domains and full URLs** - Processes both complete URLs (like `https://example.com`) and standalone domain names (like `example.com`) for defanging.
* **Only full URLs** - Processes only fully qualified URLs, ignoring standalone domain names.
* **Everything** - Applies defanging to all potential URLs, domain names, or anything resembling a URL in the text.

</details>

***

## Example

Suppose you want to **defang** a series of events that represent **URLs**:

1. In your Pipeline, open the required [Action](https://docs.onum.com/the-workspace/pipelines/actions) configuration and select the input **Field**.
2. In the **Operation** field, choose **Defang URL**.
3. Set **Escape Dots** to **true**.
4. Set **Escape HTTP** to **true**.
5. Set **Escape ://\*** to **false**.
6. Set **Process Type** to **Everything**.
7. Give your **Output field** a name and click **Save**. The URLs in your input field will be defanged. For example:

```
Input data - "https://example.com"

Escape Dots - true

Escape HTTP - true

Escape :// - false

Process Type - Everything

Output data - "hxxps://example[.]com"
```

{% hint style="info" %}
You can try out operations with specific values using the **Input** field above the operation. You can enter the value in the example above and check the result in the **Output** field.
{% endhint %}
