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

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: 4a0a00473045022100840aa5d3361d8d84a294fe9f5495e02a38a3a0089b9c01892dba3748d25ac71d02207a67b15744f14f1eac79911b67ed63e4795764c58ef92a21449e4cae62f2974e:922c64590222798bb761d5b6d8e72950