id: wordpress-adminimize

info:
  name: Adminimize Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/adminimize/
  metadata:
    max-request: 1
    plugin_namespace: adminimize
    wpscan: https://wpscan.com/plugin/adminimize
  tags: tech,wordpress,wp-plugin,top-200,discovery

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

    payloads:
      last_version: helpers/wordpress/plugins/adminimize.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: 490a004630440220256682effe9f06b9ac1fad888acc1eedc93285b907eeee0dad92284a0bece9e602207646fd2eb66fa32fda2e63f62369e86faa6c827acf51d09312930187c6c69af1:922c64590222798bb761d5b6d8e72950