id: wordpress-happy-elementor-addons

info:
  name: Happy Addons for Elementor Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/happy-elementor-addons/
  metadata:
    max-request: 1
    plugin_namespace: happy-elementor-addons
    wpscan: https://wpscan.com/plugin/happy-elementor-addons
  tags: tech,wordpress,wp-plugin,top-200

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

    payloads:
      last_version: helpers/wordpress/plugins/happy-elementor-addons.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: 490a004630440220626024e1b3d553b62847c5f6aefeabd2470b7eedeae6ccbd3c61e658c02d994d0220549a762083080cde19f7f5fbfed0aa36b4931cd7042df15d188d55ff8d0cf8fe:922c64590222798bb761d5b6d8e72950