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

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: 4a0a00473045022100c8a6f9796ba6b4c02419567978296b16df7eef98ee8c3c3c6d7d6952fa533bac02204d2e01d97575b73b6c485ad350a3c7144fac7b0c9eadf67e0756ce09cb74e123:922c64590222798bb761d5b6d8e72950