StringSimilarity

This automation calculates the similarity ratio between every string in 2 different arrays and outputs a decimal value between 0.0 and 1.0 (1.0 if the sequences are identical, and 0.0 if they don't have anything in common).

python · Common Scripts

Details

IDStringSimilarity
Languagepython
From Version6.9.0
Docker Imagedemisto/python3:3.12.13.10404775

README

This automation calculates the similarity ratio between every string in 2 different arrays and outputs a decimal value between 0.0 and 1.0 (1.0 if the sequences are identical, and 0.0 if they don’t have anything in common).

Script Data


Name Description
Script Type python3
Cortex XSOAR Version 6.9.0

Used In


This script is used in the following playbooks and scripts.

  • RDP Bitmap Cache - Detect and Hunt
  • Compare Process Execution Arguments To LOLBAS Patterns

Inputs


Argument Name Description
string_A First array of strings to compare.
string_B Second array of strings to compare.
similarity_threshold The similarity threshold to show results for, a value between 0 < x >1.

Outputs


Path Description Type
StringSimilarity.SimilarityScore Similarity score - a value between 1.0 if the sequences are identical, and 0.0 if they have nothing in common. Unknown
commonfields:
  id: StringSimilarity
  version: -1
name: StringSimilarity
script: ''
type: python
tags: []
comment: This automation calculates the similarity ratio between every string in 2 different arrays and outputs a decimal value between 0.0 and 1.0 (1.0 if the sequences are identical, and 0.0 if they don't have anything in common).
enabled: true
args:
- name: string_A
  required: true
  description: First array of strings to compare.
  isArray: true
- name: string_B
  required: true
  description: Second array of strings to compare.
  isArray: true
- name: similarity_threshold
  description: The similarity threshold to show results for, a value between 0 < x >1.
  defaultValue: "0.1"
outputs:
- contextPath: StringSimilarity.SimilarityScore
  description: Similarity score - a value between 1.0 if the sequences are identical, and 0.0 if they have nothing in common.
scripttarget: 0
dockerimage: demisto/python3:3.12.13.10404775
subtype: python3
runonce: false
runas: DBotWeakRole
fromversion: 6.9.0
tests:
- No tests (auto formatted)