id: wordpress-envato-elements

info:
  name: Envato Elements – Photos & Elementor Templates Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/envato-elements/
  metadata:
    plugin_namespace: envato-elements
    wpscan: https://wpscan.com/plugin/envato-elements
  tags: tech,wordpress,wp-plugin,top-100,top-200,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/envato-elements/readme.txt"

    payloads:
      last_version: helpers/wordpress/plugins/envato-elements.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: 4a0a0047304502202331a092add617ecca13c3e38aa1c71033cdea102f382712d3c3ecaffd3a09fc0221009d4f1eb74c18a2934d658a6de4fcd8cabb4c5fb57e18fdf8d5d813fd7210ddbd:922c64590222798bb761d5b6d8e72950