id: wordpress-leadin

info:
  name: HubSpot – CRM, Email Marketing, Live Chat, Forms & Analytics Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/leadin/
  metadata:
    plugin_namespace: leadin
    wpscan: https://wpscan.com/plugin/leadin
  tags: tech,wordpress,wp-plugin,top-200

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/leadin/readme.txt"

    payloads:
      last_version: helpers/wordpress/plugins/leadin.txt

    extractors:
      - type: regex
        part: body
        internal: true
        name: internal_detected_version
        group: 1
        regex:
          - '(?i)Stable.tag:\s?([\w.]+)'

      - type: regex
        part: body
        name: detected_version
        group: 1
        regex:
          - '(?i)Stable.tag:\s?([\w.]+)'

    matchers-condition: or
    matchers:
      - type: dsl
        name: "outdated_version"
        dsl:
          - compare_versions(internal_detected_version, concat("< ", last_version))

      - type: regex
        part: body
        regex:
          - '(?i)Stable.tag:\s?([\w.]+)'
# digest: 4a0a00473045022027bab284acfb066d1cd3f189c0f856b752ab0813374af2e4d513031e5c923e4f022100c3b99e3d4cbb422488f20064e6ef38d3dab6bc47bebef4c8b1cb17469a11c302:922c64590222798bb761d5b6d8e72950