id: api-mailchimp

info:
  name: Mailchimp API Test
  author: zzeitlin
  severity: info
  reference:
    - https://mailchimp.com/developer/transactional/docs/smtp-integration/#credentials-and-configuration
  metadata:
    max-request: 1
  tags: token-spray,mailchimp,tcp

self-contained: true
tcp:
  - inputs:
      - data: "AUTH PLAIN {{base64(hex_decode('00')+'apikey'+hex_decode('00')+token)}}\r\n"
        read: 1024
    host:
      - "tls://smtp.mandrillapp.com:465"
    matchers:
      - type: word
        words:
          - "success"
# digest: 4b0a00483046022100dcc914aa1252f5607d7f951213c5c81fb4f53d36b4a3548ab8f8307624adef6e022100f671dd86e29255cca370a3e2038e1c21e075857a08f08a18b950c9e8309f3e2c:922c64590222798bb761d5b6d8e72950