type.inbound
and regex.icontains(body.html.raw,
'<script[^>]*>[^<]*setDate\s*\(\s*[^<]*getDate\s*\(',
'<script[^>]*>[^<]*new\s+Date\s*\([^<]*(?:toLocaleDateString|toDateString|toISOString|toLocaleString)'
)
and any(ml.nlu_classifier(body.current_thread.text).intents,
.name == "cred_theft"
)
Playground
Test against your own EMLs or sample data.