Skip to main content

FetchIndicatorsFromFile

This Script is part of the Common Scripts Pack.#

Supported versions

Supported Cortex XSOAR versions: 6.5.0 and later.

Fetches indicators from a file.

Supported File Types#

  • TXT
  • XLS, XLSX
  • CSV
  • DOC, DOCX

If an Excel file is supplied (XLS, XLSX, CSV), you need to specify the column_number argument, which defines the column to fetch from.

Script Data#


NameDescription
Script Typepython3
Tagsindicators
Cortex XSOAR Version5.5.0

Inputs#


Argument NameDescription
entry_idThe file entry_id from which to fetch the indicators.
auto_detectWhether to auto-detect the indicator type from the file.
default_typeSets a default indicator type.
limitThe maximum number of indicators to fetch. If this argument is not specified, will parse the entire file.
offsetThe index for the first indicator to fetch.
indicator_column_numberOnly for spreadsheet files. The column number in the spreadsheet that contains the indicators. The first column number is 1. If this argument is not specified, will use at the first column.
sheet_nameOnly for spreadsheet files. The name of the Excel sheet to fetch indicators from. If this argument is not specified, will fetch from the first sheet of the workbook.
indicator_type_column_numberOnly for spreadsheet files. The column number in the spreadsheet that contains the indicator types. The first column number is 1.
starting_rowOnly for spreadsheet files. The starting row of the spreadsheet to fetch from. The first row is 1.

Automation Example#

!FetchIndicatorsFromFile auto_detect=True entry_id={entry_id}

Human Readable Output#


Indicators from indicator.csv:

valuetype
xsoar.comDomain
8.8.8.8IP
8.8.8.8/12CIDR