id: wordpress-royal-elementor-addons

info:
  name: Royal Elementor Addons and Templates Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/royal-elementor-addons/
  metadata:
    plugin_namespace: royal-elementor-addons
    wpscan: https://wpscan.com/plugin/royal-elementor-addons
  tags: tech,wordpress,wp-plugin,top-200,discovery

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

    payloads:
      last_version: helpers/wordpress/plugins/royal-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: 4a0a00473045022043f442b9dd8440f232a81b4f3dcb09ac0437ae2f3ef420dca59b9e21e32ba08d022100f8fc8e3350d65786e6eb18cd5bbca521626294ab639f4c8b56ef2e2cf4d3aadc:922c64590222798bb761d5b6d8e72950