Skip to main content
Skip table of contents

Convert IPv4 Numbers to IP Addresses

LAST UPDATED: AUG 07, 2024

Converts IPv4 numbers into standard IP addresses

Implementation

System

Command Category

Cyber Utility

Tags

ARTIFACT IP

Inputs

Parameter Name

Required/Optional

Description

Sample Data

IPv4 Numbers

Required

An array of IPv4 numbers to be converted into standard IPv4 addresses.

CODE
[3232235521, 2130706433, 3455840871]

Output

Key Fields

Important key-value pairs extracted from Raw Data.

SAMPLE DATA

JSON
{
    "IPv4Numbers": [
        3232235521,
        2130706433,
        3455840871
    ],
    "IPv4Addresses": "[\"192.168.0.1\",\"127.0.0.1\",\"205.251.242.103\"]"
}
Return Data

The returned result of this command. If some required parameters are not defined, this returned data could be empty. The returned result can be passed down directly to a subsequent command in playbooks.

SAMPLE DATA

JSON
[
    {
        "IPNumber": 3232235521,
        "IP": "192.168.0.1"
    },
    {
        "IPNumber": 2130706433,
        "IP": "127.0.0.1"
    },
    {
        "IPNumber": 3455840871,
        "IP": "205.251.242.103"
    }
]
Context Data

The response data from the utility command.

SAMPLE DATA

JSON
[
    {
        "IPNumber": 3232235521,
        "IP": "192.168.0.1"
    },
    {
        "IPNumber": 2130706433,
        "IP": "127.0.0.1"
    },
    {
        "IPNumber": 3455840871,
        "IP": "205.251.242.103"
    }
]

Remote Command API

The D3 command API allows you to send requests to D3 SOAR to execute this utility command via REST API.

Request

POST

CODE
https:/{base_url}/{api_namespace}/api/Command/ConvertIPV4NumberToIps

Headers

Please refer to the page Webhook Configuration Guide - Authentication Method: API Keys for more details.

Request Body

JSON
{
  "Username": <Username here>,
  "Site": <Site here>,
  "CommandParams": {
    "IPv4 Numbers": <An array of IPv4 numbers to be converted into standard IPv4 addresses>
  }
}

Body Parameters

Parameter Name

Type

Required/Optional

Description

Username

string

Required

The username of your D3 SOAR account.

Site

string

Required

The D3 SOAR site to run the remote command.

IPv4 Numbers

array<integer>

Required

An array of IPv4 numbers to be converted into standard IPv4 addresses.

Sample Request

SAMPLE DATA

JSON
{
  "Username": "Admin",
  "Site": "Security Operations",
  "CommandParams": {
    "IPv4 Numbers": [
      3232235521,
      2130706433,
      3455840871
    ]
  }
}

Response

Response Fields

Field Name

Type

Description

error

string

The error message if the API request has failed.

keyFields

JSON Object

The key fields from the API request.

returnData

array<JSON Object>

The return data from the API request.

contextData

array<JSON Object>

The context data from the API request.

Sample Response

JSON
{
    "error": "",
    "keyFields": {
          "IPv4Numbers": [
              3232235521,
              2130706433,
              3455840871
          ],
          "IPv4Addresses": "[\"192.168.0.1\",\"127.0.0.1\",\"205.251.242.103\"]"
      },
    "returnData": [
      {
          "IPNumber": 3232235521,
          "IP": "192.168.0.1"
      },
      {
          "IPNumber": 2130706433,
          "IP": "127.0.0.1"
      },
      {
          "IPNumber": 3455840871,
          "IP": "205.251.242.103"
      }
    ],
    "contextData": [
      {
          "IPNumber": 3232235521,
          "IP": "192.168.0.1"
      },
      {
          "IPNumber": 2130706433,
          "IP": "127.0.0.1"
      },
      {
          "IPNumber": 3455840871,
          "IP": "205.251.242.103"
      }
    ]
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.