type.inbound
and any(attachments,
.size <= 400
and (
.file_extension in~ ("html", "htm", "shtml", "dhtml")
or .file_extension in~ $file_extensions_common_archives
or .file_type == "html"
)
and any(file.explode(.),
"setTimeout" in .scan.javascript.identifiers
and any(.scan.strings.strings,
strings.ilike(., "*location.href*")
)
)
)
Playground
Test against your own EMLs or sample data.