id: wordpress-ultimate-addons-for-gutenberg

info:
  name: Spectra Gutenberg Blocks – Website Builder for the Block Editor Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/ultimate-addons-for-gutenberg/
  metadata:
    plugin_namespace: ultimate-addons-for-gutenberg
    wpscan: https://wpscan.com/plugin/ultimate-addons-for-gutenberg
  tags: tech,wordpress,wp-plugin,top-100,top-200,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/ultimate-addons-for-gutenberg/readme.txt"

    payloads:
      last_version: helpers/wordpress/plugins/ultimate-addons-for-gutenberg.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: 490a00463044022026a13cb6c63dccc27204a047816cf0ba99d3aba82e61e4b5d0459ec9c8d42f26022062b5b1331520afb74f323b837a355f7572dc024310e9d8acbf47c60ddde529d8:922c64590222798bb761d5b6d8e72950