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,discovery

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: 490a00463044022006e4d9bf3aa736fedf9f24f29b0e5211d60fb9ea12bf3da41a987a504f8177a802204799dd248871efbf0668b591c8ad5d34bfb3e8f610cb9827d1625613f0c7e6a1:922c64590222798bb761d5b6d8e72950