type.inbound
and any(attachments,
(
.file_type == "html"
and 2 of (
regex.icontains(file.parse_html(.).raw,
'route\.join\(\s*["'']{2}\s*\)'
),
regex.icontains(file.parse_html(.).raw,
'\.src\s*=\s*(?:url|protocol)'
),
regex.icontains(file.parse_html(.).raw, 'const\s+host\s*=\s*["'']')
)
)
or (
(.file_extension == "eml" or .content_type == "message/rfc822")
and any(file.parse_eml(.).attachments,
.file_type == "html"
and 2 of (
regex.icontains(file.parse_html(.).raw,
'route\.join\(\s*["'']{2}\s*\)'
),
regex.icontains(file.parse_html(.).raw,
'\.src\s*=\s*(?:url|protocol)'
),
regex.icontains(file.parse_html(.).raw,
'const\s+host\s*=\s*["'']'
)
)
)
)
)
Playground
Test against your own EMLs or sample data.