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