id: wordpress-envato-elements

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

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