{ "kind": "open-flow-workflow", "version": 1, "name": "Report Steam Phishing Domains", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_84b902a7b7b82cb2": { "name": "Receive a domain by GET", "kind": "webhook", "bodyFields": [], "method": "GET", "options": { "responseBody": { "kind": "workflow-outputs", "output": "body", "timeoutMs": 60000 }, "responseHeaders": { "WWW-Authenticate": "Basic realm=\"Reports\"" }, "responseStatusCodeOutput": "statusCode" } }, "n_38864fedf3dc6950": { "inputs": { "headers": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_84b902a7b7b82cb2", "output": "headers" } ] }, "query": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_84b902a7b7b82cb2", "output": "query" } ] }, "expectedAuthorization": { "kind": "unset" } }, "name": "Authorize and validate the domain", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "headers" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "query" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "expectedAuthorization" } ], "outputs": [ { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "domain" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "url" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "accepted" }, { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "body" } ], "name": "Authorize and validate the domain", "moduleId": "n_2566adbdbcb7fbca", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_a757033bcd2d05f0": { "inputs": {}, "name": "Request accepted", "kind": "condition", "matchMode": "first", "cases": [ { "output": "yes", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_38864fedf3dc6950", "output": "accepted" } }, "operator": "isTrue" } ] } ] } ] }, "n_0acdbabef7e4cd7b": { "inputs": { "url": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_38864fedf3dc6950", "output": "url" } ] } }, "name": "Resolve nameservers", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "url" } ], "outputs": [ { "jsonSchema": {}, "nullable": true, "handle": "body" }, { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": { "type": "string" } }, "nullable": false, "handle": "headers" } ], "name": "Resolve nameservers", "executor": { "method": "GET", "query": { "mode": "fields", "names": [] }, "headers": { "mode": "fields", "names": [] }, "bodyFormat": "none", "authentication": { "type": "none" }, "responseFormat": "json", "statusPolicy": "success", "kind": "http-request" } } }, "n_cec20b4f158a3900": { "inputs": { "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_0acdbabef7e4cd7b", "output": "body" } ] }, "domain": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_38864fedf3dc6950", "output": "domain" } ] } }, "name": "Inspect nameservers", "kind": "task", "task": { "inputs": [ { "jsonSchema": {}, "nullable": true, "handle": "body" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "domain" } ], "outputs": [ { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "hasNameservers" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "cloudflare" } ], "name": "Inspect nameservers", "moduleId": "n_dbdc2a367ed1f6ae", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_3408b2feb18734c3": { "inputs": {}, "name": "Nameservers found", "kind": "condition", "matchMode": "first", "cases": [ { "output": "yes", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_cec20b4f158a3900", "output": "hasNameservers" } }, "operator": "isTrue" } ] } ] } ] }, "n_04600f7acbc7dd45": { "inputs": { "domain": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_38864fedf3dc6950", "output": "domain" } ] } }, "name": "Prepare the reports", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "domain" } ], "outputs": [ { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "steamSubject" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "steamText" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "cfSubject" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "cfText" } ], "name": "Prepare the reports", "moduleId": "n_8e1cadaa2d9923f5", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_663c014bd244c674": { "inputs": {}, "name": "Cloudflare nameservers", "kind": "condition", "matchMode": "first", "cases": [ { "output": "yes", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_cec20b4f158a3900", "output": "cloudflare" } }, "operator": "isTrue" } ] } ] } ] }, "n_b0443bb8517fe74f": { "inputs": { "domain": { "kind": "value", "value": "YOUR_MAILGUN_DOMAIN" }, "from": { "kind": "value", "value": "YOUR_VERIFIED_SENDER" }, "to": { "kind": "value", "value": [ "security@cloudflare.com" ] }, "subject": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_04600f7acbc7dd45", "output": "cfSubject" } ] }, "text": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_04600f7acbc7dd45", "output": "cfText" } ] } }, "name": "Report to Cloudflare", "kind": "task", "task": { "inputs": [ { "description": "Mailgun sending domain name.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Mailgun sending domain name." }, "nullable": false, "handle": "domain" }, { "description": "Email address for the From header. Friendly name format is supported.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Email address for the From header. Friendly name format is supported." }, "nullable": true, "handle": "from", "value": null }, { "description": "Primary recipients. Mailgun accepts email addresses or friendly name strings.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "Recipient email address or friendly name string." }, "minItems": 1, "description": "Primary recipients. Mailgun accepts email addresses or friendly name strings." }, "nullable": false, "handle": "to" }, { "description": "Carbon copy recipients.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "Carbon copy recipient email address or friendly name string." }, "description": "Carbon copy recipients." }, "nullable": true, "handle": "cc", "value": null }, { "description": "Blind carbon copy recipients.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "Blind carbon copy recipient email address or friendly name string." }, "description": "Blind carbon copy recipients." }, "nullable": true, "handle": "bcc", "value": null }, { "description": "Message subject line.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Message subject line." }, "nullable": true, "handle": "subject", "value": null }, { "description": "Plain text message body.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Plain text message body." }, "nullable": true, "handle": "text", "value": null }, { "description": "HTML message body.", "jsonSchema": { "type": "string", "minLength": 1, "description": "HTML message body." }, "nullable": true, "handle": "html", "value": null }, { "description": "AMP HTML message body.", "jsonSchema": { "type": "string", "minLength": 1, "description": "AMP HTML message body." }, "nullable": true, "handle": "ampHtml", "value": null }, { "description": "Stored Mailgun template name to render for this email.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Stored Mailgun template name to render for this email." }, "nullable": true, "handle": "template", "value": null }, { "description": "Template version tag to render.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Template version tag to render." }, "nullable": true, "handle": "templateVersion", "value": null }, { "description": "Whether Mailgun should generate a text part from the template.", "jsonSchema": { "type": "boolean", "description": "Whether Mailgun should generate a text part from the template." }, "nullable": true, "handle": "templateText", "value": null }, { "description": "Template variables encoded into Mailgun t:variables.", "jsonSchema": { "type": "object", "additionalProperties": { "description": "Template variable value." }, "description": "Template variables encoded into Mailgun t:variables." }, "nullable": true, "handle": "templateVariables", "value": null }, { "description": "Recipient variables for Mailgun batch sending.", "jsonSchema": { "type": "object", "additionalProperties": { "type": "object", "properties": {}, "additionalProperties": true, "description": "Variables for one recipient." }, "description": "Recipient variables for Mailgun batch sending." }, "nullable": true, "handle": "recipientVariables", "value": null }, { "description": "Mailgun tags attached to the message.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "Mailgun tag." }, "description": "Mailgun tags attached to the message." }, "nullable": true, "handle": "tags", "value": null }, { "description": "String map forwarded to Mailgun.", "jsonSchema": { "type": "object", "additionalProperties": { "type": "string", "description": "Map value." }, "description": "String map forwarded to Mailgun." }, "nullable": true, "handle": "headers", "value": null }, { "description": "Custom Mailgun user variables stored with events and webhooks.", "jsonSchema": { "type": "object", "additionalProperties": { "description": "Custom variable value." }, "description": "Custom Mailgun user variables stored with events and webhooks." }, "nullable": true, "handle": "variables", "value": null }, { "description": "Scheduled delivery time in RFC 2822 format.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Scheduled delivery time in RFC 2822 format." }, "nullable": true, "handle": "deliveryTime", "value": null }, { "description": "Maximum delivery window such as 1h30m or 24h.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Maximum delivery window such as 1h30m or 24h." }, "nullable": true, "handle": "deliverWithin", "value": null }, { "description": "Whether to send in Mailgun test mode.", "jsonSchema": { "type": "boolean", "description": "Whether to send in Mailgun test mode." }, "nullable": true, "handle": "testMode", "value": null }, { "description": "Mailgun yes/no or boolean string option value.", "jsonSchema": { "type": "string", "enum": [ "yes", "no", "true", "false" ], "description": "Mailgun yes/no or boolean string option value." }, "nullable": true, "handle": "dkim", "value": null }, { "description": "Mailgun tracking option value.", "jsonSchema": { "type": "string", "enum": [ "yes", "no", "true", "false", "htmlonly" ], "description": "Mailgun tracking option value." }, "nullable": true, "handle": "tracking", "value": null }, { "description": "Mailgun tracking option value.", "jsonSchema": { "type": "string", "enum": [ "yes", "no", "true", "false", "htmlonly" ], "description": "Mailgun tracking option value." }, "nullable": true, "handle": "trackingClicks", "value": null }, { "description": "Mailgun yes/no or boolean string option value.", "jsonSchema": { "type": "string", "enum": [ "yes", "no", "true", "false" ], "description": "Mailgun yes/no or boolean string option value." }, "nullable": true, "handle": "trackingOpens", "value": null }, { "description": "Whether Mailgun must deliver only over TLS.", "jsonSchema": { "type": "boolean", "description": "Whether Mailgun must deliver only over TLS." }, "nullable": true, "handle": "requireTls", "value": null }, { "description": "Whether Mailgun should skip MX TLS certificate verification.", "jsonSchema": { "type": "boolean", "description": "Whether Mailgun should skip MX TLS certificate verification." }, "nullable": true, "handle": "skipVerification", "value": null }, { "description": "Dedicated sending IP address to use.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Dedicated sending IP address to use." }, "nullable": true, "handle": "sendingIp", "value": null }, { "description": "Dedicated IP pool ID to use.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Dedicated IP pool ID to use." }, "nullable": true, "handle": "sendingIpPool", "value": null } ], "outputs": [ { "description": "Mailgun message identifier.", "jsonSchema": { "type": [ "string", "null" ], "description": "Mailgun message identifier." }, "nullable": true, "handle": "id" }, { "description": "Mailgun status message.", "jsonSchema": { "type": [ "string", "null" ], "description": "Mailgun status message." }, "nullable": true, "handle": "message" }, { "description": "Object returned by Mailgun.", "jsonSchema": { "type": "object", "properties": {}, "additionalProperties": true, "description": "Object returned by Mailgun." }, "nullable": false, "handle": "raw" } ], "name": "Report to Cloudflare", "executor": { "kind": "connector", "action": "mailgun.send_email" } } }, "n_6b883bc20aba3811": { "inputs": { "domain": { "kind": "value", "value": "YOUR_MAILGUN_DOMAIN" }, "from": { "kind": "value", "value": "YOUR_VERIFIED_SENDER" }, "to": { "kind": "value", "value": [ "security@valvesoftware.com" ] }, "subject": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_04600f7acbc7dd45", "output": "steamSubject" } ] }, "text": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_04600f7acbc7dd45", "output": "steamText" } ] } }, "name": "Report to Valve", "kind": "task", "task": { "inputs": [ { "description": "Mailgun sending domain name.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Mailgun sending domain name." }, "nullable": false, "handle": "domain" }, { "description": "Email address for the From header. Friendly name format is supported.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Email address for the From header. Friendly name format is supported." }, "nullable": true, "handle": "from", "value": null }, { "description": "Primary recipients. Mailgun accepts email addresses or friendly name strings.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "Recipient email address or friendly name string." }, "minItems": 1, "description": "Primary recipients. Mailgun accepts email addresses or friendly name strings." }, "nullable": false, "handle": "to" }, { "description": "Carbon copy recipients.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "Carbon copy recipient email address or friendly name string." }, "description": "Carbon copy recipients." }, "nullable": true, "handle": "cc", "value": null }, { "description": "Blind carbon copy recipients.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "Blind carbon copy recipient email address or friendly name string." }, "description": "Blind carbon copy recipients." }, "nullable": true, "handle": "bcc", "value": null }, { "description": "Message subject line.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Message subject line." }, "nullable": true, "handle": "subject", "value": null }, { "description": "Plain text message body.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Plain text message body." }, "nullable": true, "handle": "text", "value": null }, { "description": "HTML message body.", "jsonSchema": { "type": "string", "minLength": 1, "description": "HTML message body." }, "nullable": true, "handle": "html", "value": null }, { "description": "AMP HTML message body.", "jsonSchema": { "type": "string", "minLength": 1, "description": "AMP HTML message body." }, "nullable": true, "handle": "ampHtml", "value": null }, { "description": "Stored Mailgun template name to render for this email.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Stored Mailgun template name to render for this email." }, "nullable": true, "handle": "template", "value": null }, { "description": "Template version tag to render.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Template version tag to render." }, "nullable": true, "handle": "templateVersion", "value": null }, { "description": "Whether Mailgun should generate a text part from the template.", "jsonSchema": { "type": "boolean", "description": "Whether Mailgun should generate a text part from the template." }, "nullable": true, "handle": "templateText", "value": null }, { "description": "Template variables encoded into Mailgun t:variables.", "jsonSchema": { "type": "object", "additionalProperties": { "description": "Template variable value." }, "description": "Template variables encoded into Mailgun t:variables." }, "nullable": true, "handle": "templateVariables", "value": null }, { "description": "Recipient variables for Mailgun batch sending.", "jsonSchema": { "type": "object", "additionalProperties": { "type": "object", "properties": {}, "additionalProperties": true, "description": "Variables for one recipient." }, "description": "Recipient variables for Mailgun batch sending." }, "nullable": true, "handle": "recipientVariables", "value": null }, { "description": "Mailgun tags attached to the message.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "Mailgun tag." }, "description": "Mailgun tags attached to the message." }, "nullable": true, "handle": "tags", "value": null }, { "description": "String map forwarded to Mailgun.", "jsonSchema": { "type": "object", "additionalProperties": { "type": "string", "description": "Map value." }, "description": "String map forwarded to Mailgun." }, "nullable": true, "handle": "headers", "value": null }, { "description": "Custom Mailgun user variables stored with events and webhooks.", "jsonSchema": { "type": "object", "additionalProperties": { "description": "Custom variable value." }, "description": "Custom Mailgun user variables stored with events and webhooks." }, "nullable": true, "handle": "variables", "value": null }, { "description": "Scheduled delivery time in RFC 2822 format.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Scheduled delivery time in RFC 2822 format." }, "nullable": true, "handle": "deliveryTime", "value": null }, { "description": "Maximum delivery window such as 1h30m or 24h.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Maximum delivery window such as 1h30m or 24h." }, "nullable": true, "handle": "deliverWithin", "value": null }, { "description": "Whether to send in Mailgun test mode.", "jsonSchema": { "type": "boolean", "description": "Whether to send in Mailgun test mode." }, "nullable": true, "handle": "testMode", "value": null }, { "description": "Mailgun yes/no or boolean string option value.", "jsonSchema": { "type": "string", "enum": [ "yes", "no", "true", "false" ], "description": "Mailgun yes/no or boolean string option value." }, "nullable": true, "handle": "dkim", "value": null }, { "description": "Mailgun tracking option value.", "jsonSchema": { "type": "string", "enum": [ "yes", "no", "true", "false", "htmlonly" ], "description": "Mailgun tracking option value." }, "nullable": true, "handle": "tracking", "value": null }, { "description": "Mailgun tracking option value.", "jsonSchema": { "type": "string", "enum": [ "yes", "no", "true", "false", "htmlonly" ], "description": "Mailgun tracking option value." }, "nullable": true, "handle": "trackingClicks", "value": null }, { "description": "Mailgun yes/no or boolean string option value.", "jsonSchema": { "type": "string", "enum": [ "yes", "no", "true", "false" ], "description": "Mailgun yes/no or boolean string option value." }, "nullable": true, "handle": "trackingOpens", "value": null }, { "description": "Whether Mailgun must deliver only over TLS.", "jsonSchema": { "type": "boolean", "description": "Whether Mailgun must deliver only over TLS." }, "nullable": true, "handle": "requireTls", "value": null }, { "description": "Whether Mailgun should skip MX TLS certificate verification.", "jsonSchema": { "type": "boolean", "description": "Whether Mailgun should skip MX TLS certificate verification." }, "nullable": true, "handle": "skipVerification", "value": null }, { "description": "Dedicated sending IP address to use.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Dedicated sending IP address to use." }, "nullable": true, "handle": "sendingIp", "value": null }, { "description": "Dedicated IP pool ID to use.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Dedicated IP pool ID to use." }, "nullable": true, "handle": "sendingIpPool", "value": null } ], "outputs": [ { "description": "Mailgun message identifier.", "jsonSchema": { "type": [ "string", "null" ], "description": "Mailgun message identifier." }, "nullable": true, "handle": "id" }, { "description": "Mailgun status message.", "jsonSchema": { "type": [ "string", "null" ], "description": "Mailgun status message." }, "nullable": true, "handle": "message" }, { "description": "Object returned by Mailgun.", "jsonSchema": { "type": "object", "properties": {}, "additionalProperties": true, "description": "Object returned by Mailgun." }, "nullable": false, "handle": "raw" } ], "name": "Report to Valve", "executor": { "kind": "connector", "action": "mailgun.send_email" } } }, "n_5455f7cdf802e64c": { "inputs": { "statusCode": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_38864fedf3dc6950", "output": "statusCode" } ] }, "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_38864fedf3dc6950", "output": "body" } ] } }, "name": "Reject the request", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "body" } ], "outputs": [ { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "body" } ], "name": "Reject the request", "moduleId": "n_bbe6d570fa513fd9", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_4f9f82eef7c8a577": { "inputs": { "hasNameservers": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_cec20b4f158a3900", "output": "hasNameservers" } ] }, "cloudflare": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_cec20b4f158a3900", "output": "cloudflare" } ] } }, "name": "Finish the report", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "hasNameservers" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "cloudflare" } ], "outputs": [ { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "body" } ], "name": "Finish the report", "moduleId": "n_b2a6dd8cce69d5e1", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_664d5da7c06cd874": { "name": "Return the result", "kind": "outputs", "outputDefs": [ { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "body" } ], "outputMappings": { "statusCode": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_5455f7cdf802e64c", "output": "statusCode" }, { "kind": "node", "nodeId": "n_4f9f82eef7c8a577", "output": "statusCode" } ] }, "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_5455f7cdf802e64c", "output": "body" }, { "kind": "node", "nodeId": "n_4f9f82eef7c8a577", "output": "body" } ] } } } }, "edges": [ { "source": "n_84b902a7b7b82cb2", "target": "n_38864fedf3dc6950" }, { "source": "n_38864fedf3dc6950", "target": "n_a757033bcd2d05f0" }, { "source": "n_a757033bcd2d05f0", "target": "n_0acdbabef7e4cd7b", "sourceHandle": "yes" }, { "source": "n_a757033bcd2d05f0", "target": "n_5455f7cdf802e64c", "sourceHandle": "otherwise" }, { "source": "n_5455f7cdf802e64c", "target": "n_664d5da7c06cd874" }, { "source": "n_0acdbabef7e4cd7b", "target": "n_cec20b4f158a3900" }, { "source": "n_cec20b4f158a3900", "target": "n_3408b2feb18734c3" }, { "source": "n_3408b2feb18734c3", "target": "n_04600f7acbc7dd45", "sourceHandle": "yes" }, { "source": "n_04600f7acbc7dd45", "target": "n_6b883bc20aba3811" }, { "source": "n_6b883bc20aba3811", "target": "n_663c014bd244c674" }, { "source": "n_663c014bd244c674", "target": "n_b0443bb8517fe74f", "sourceHandle": "yes" }, { "source": "n_663c014bd244c674", "target": "n_4f9f82eef7c8a577", "sourceHandle": "otherwise" }, { "source": "n_b0443bb8517fe74f", "target": "n_4f9f82eef7c8a577" }, { "source": "n_3408b2feb18734c3", "target": "n_4f9f82eef7c8a577", "sourceHandle": "otherwise" }, { "source": "n_4f9f82eef7c8a577", "target": "n_664d5da7c06cd874" } ] } }, "modules": { "n_2566adbdbcb7fbca": { "name": "Authorize and validate the domain", "imports": [], "source": "import { Buffer } from 'node:buffer';\nexport default function authorize({headers,query,expectedAuthorization}) {\n const expected=typeof expectedAuthorization==='string'?expectedAuthorization.trim():'';\n const parsed=/^Basic ([A-Za-z0-9+/]+={0,2})$/.exec(expected);\n const credentials=parsed?Buffer.from(parsed[1],'base64').toString('utf8'):'';\n if(!parsed || !/^[^:]+:.+$/.test(credentials) || /[\\r\\n]/.test(credentials))throw Error('Configure a Basic authorization secret with a username and password.');\n const matches=Object.entries(headers||{}).filter(([k])=>k.toLowerCase()==='authorization');\n const received=matches.length===1 && typeof matches[0][1]==='string'?/^Basic +([A-Za-z0-9+/]+={0,2})$/i.exec(matches[0][1].trim()):null;\n const actual=received?Buffer.from(received[1],'base64').toString('utf8'):'';\n let diff=credentials.length^actual.length;\n for(let i=0;i253||q.length<1||q.endsWith('.')||!q.split('.').every(s=>s.length>=1&&s.length<=63&&/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test(s)))return {accepted:false,statusCode:400,domain:'-',url:'-',body:{error:'Provide a valid ASCII domain in q.'}};\n return {accepted:true,statusCode:200,domain:q.toLowerCase(),url:'https://dns.google/resolve?name='+encodeURIComponent(q)+'&type=NS',body:{}};\n}\n" }, "n_dbdc2a367ed1f6ae": { "name": "Inspect nameservers", "imports": [], "source": "export default function inspectDns({body,domain}) {\n if(!body||typeof body!=='object'||Array.isArray(body)||!Number.isInteger(body.Status)||body.TC!==false)throw Error('Invalid or truncated DNS response');\n if(body.Status===3)return {hasNameservers:false,cloudflare:false};\n if(body.Status!==0)throw Error('DNS lookup failed');\n if(body.Answer!==undefined&&!Array.isArray(body.Answer))throw Error('Invalid DNS answer');\n const answers=body.Answer||[];\n const ns=answers.filter(a=>a&&a.type===2);\n if(ns.some(a=>typeof a.data!=='string'||!a.data.trim()))throw Error('Invalid nameserver');\n return {hasNameservers:ns.length>0,cloudflare:ns.some(a=>/(?:^|\\.)cloudflare\\.com\\.?$/i.test(a.data))};\n}\n" }, "n_8e1cadaa2d9923f5": { "name": "Prepare the reports", "imports": [], "source": "export default function message({domain}) {\n return {steamSubject:domain+' - Steam Phishing Website',steamText:'Hello,\\n\\nI am emailing you to let you know about a Steam phishing website: '+domain+'.\\n\\nThank you,\\nYour Name Here',cfSubject:domain+' - Steam Phishing Website on your network',cfText:'Hello,\\n\\nI am emailing you to let you know about a Steam phishing website on your network: '+domain+'.\\n\\nThank you,\\nYour Name Here'};\n}\n" }, "n_bbe6d570fa513fd9": { "name": "Reject the request", "imports": [], "source": "export default function reject({statusCode,body}) {return {statusCode,body};}\n" }, "n_b2a6dd8cce69d5e1": { "name": "Finish the report", "imports": [], "source": "export default function finish({hasNameservers,cloudflare}) {return {statusCode:200,body:{reported:hasNameservers,cloudflare:hasNameservers&&cloudflare}};}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }