id: wordpress-loginizer

info:
  name: Loginizer Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/loginizer/
  metadata:
    plugin_namespace: loginizer
    wpscan: https://wpscan.com/plugin/loginizer
  tags: tech,wordpress,wp-plugin,top-100,top-200,discovery

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

    payloads:
      last_version: helpers/wordpress/plugins/loginizer.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: 4a0a004730450221009916d86ed7e451f02832550d1d290434516dbf0ab7c59f71abee9ab00a7ac6a8022026113e07d22f47e02ab52993711d0d7e0108380c4853bfab4b6c9711db4d398a:922c64590222798bb761d5b6d8e72950