Skip to content
This repository has been archived by the owner on May 3, 2020. It is now read-only.

Parsing by Assessment Type or Performing a String Comparison in a Report

BuffaloWill edited this page Aug 4, 2017 · 4 revisions

Parsing by assessment type in a report is a common function. There is a string comparison operator (√) to make this easy.

String Comparison on Global Variable

† √ short_company_name:::acme inc √ † 
The company name is acme.  
¥

This will compare the short_company_name (ΩSHORT_COMPANY_NAMEΩ) to the string "acme inc". The string comparison is case insensitive.

String Comparison on UDV

Due to the scoping of variables (XPATH), you need to modify this comparison for UDV's.

Precede the variable with a ":" for UDV's:

† √ :my_udv_name:::udv value √ † 
This tests for a udv  
¥

This will compare the my_udv_name (§my_udv_name§) to the string "udv value".

String Comparison for Finding Variable

Precede the variable with a "+" for finding variables:

† √ +title:::cross site scripting √ † 
The title is cross site scripting.
¥

This will compare the title (πtitleπ) to the string "cross site scripting".

Classic String Comparison

If all else fails, you can use the translate function. This is historically how string comparison was done:

¬report/findings_list/findings:::risk>3¬
† translate(assessment_type,$up,$low)=translate('External',$up,$low) †
FINDINGS
¥
∆

To perform the same function inside of a table:

æreport/findings_list/findings:::risk<5:::translate(assessment_type,$up,$low)=translate('external',$up,$low)æ ∞title∞

Overall the translate() function can be used for string comparison.